弹出提示的效果代码 时间:2020-05-12 人气:0 ---模拟弹出提示 <script language=javascript> var cao_x,cao_y; function cao888() { this.display=display; } function display() { document.write("留言"); document.write(""); document.write(""); document.write(""); document.write(""); document.write(""); document.write(""); document.write(""); document.write("欢迎光临[确定]"); document.write(" "); document.write(""); } function caoMove(obj) //实现层的拖移 { if(event.button==1) { var caoX=obj.clientLeft; var caoY=obj.clientTop; obj.style.pixelLeft=caoX+(event.x-cao_x); obj.style.pixelTop=caoY+(event.y-cao_y); } } </script> <script language=javascript> var mycao=new cao888(); mycao.display(); </script> [Ctrl+A 全选 注:如需引入外部Js需刷新才能执行] 加载全部内容