资料
表格
制度
合同
管理
职场
经营
创业
范文
总结
计划
作文
文章
美文
词句
教程
模板
图片
字体
图标
办公
人事
财务
生产
管理资源吧首页
>>>
教程
>>>
编程
>>>
JavaScript教程
>>>
弹出提示的效果代码
<html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=gb2312" /> <title>管理资源吧---模拟弹出提示 管理资源吧</title> </head> <body> <img src="/_New/_cj/myeditor/sysimage/space.gif" class="ewebeditor__script" _ewebeditor_fake_tag="script" _ewebeditor_fake_value="%3Cscript%20language%3Djavascript%3E%20%20%0D%0Avar%20cao_x%2Ccao_y%3B%20%20%0D%0A%0D%0Afunction%20cao888()%20%20%20%0D%0A%7B%20%20%0D%0Athis.display%3Ddisplay%3B%20%20%20%0D%0A%7D%20%20%0D%0A%0D%0Afunction%20display()%20%20%20%0D%0A%7B%20%20%0D%0A%20%20document.write(%22%3Ctable%20align%3Dcenter%3E%3Ctr%3E%3Ctd%3E%3Cbutton%20style%3D'width%3A100px%3Bheight%3A30px%3Bfont-size%3A12px%3Bborder%3A1px%20solid%20%23A4B3C8%3Bbackground-color%3Agreen%3B'%20type%3Dbutton%20onclick%3Ddocument.getElementById('cao1').style.display%3D'block'%20onfocus%3Dthis.blur()%3E%E8%84%9A%E6%9C%AC%E4%B9%8B%E5%AE%B6%E7%95%99%E8%A8%80%3C%2Fbutton%3E%3C%2Ftd%3E%3C%2Ftr%3E%3C%2Ftable%3E%22)%3B%20%20%0D%0A%20%20document.write(%22%3Cdiv%20%20id%3D'cao1'%20style%3D'font-size%3A12px%3Bposition%3Aabsolute%3Bdisplay%3Anone%3Btext-align%3Acenter%3Boverflow%3Avisible'%3E%22)%3B%20%20%0D%0A%20%20document.write(%22%3Cdiv%20style%3D'position%3Aabsolute%3Btop%3Aexpression((body.clientHeight-300)%2F2)%3Bleft%3Aexpression((body.clientWidth-200)%2F2)%3Bwidth%3A200px%3Bheight%3A180px%3Bbackground-color%3A%23dbdbdb%3Bborder%3A1px%20solid%20%23cccccc%3B'%3E%22)%3B%20%20%0D%0A%20%20document.write(%22%3Ctable%20width%3D200%20height%3D20%20bgcolor%3Dgreen%20onmousedown%3D'cao_x%3Devent.x-parentNode.style.pixelLeft%3Bcao_y%3Devent.y-parentNode.style.pixelTop%3BsetCapture()%3B'%20onmouseup%3D'releaseCapture()%3B'%20onmousemove%3D'caoMove(this.parentNode)'%20style%3D'cursor%3Amove%3B'%3E%22)%3B%20%20%0D%0A%20%20document.write(%22%3Ctr%20align%3Dcenter%3E%22)%3B%20%20%0D%0A%20%20document.write(%22%3Ctd%20align%3Dleft%3E%E8%84%9A%E6%9C%AC%E4%B9%8B%E5%AE%B6%3C%2Ftd%3E%22)%3B%20%20%0D%0A%20%20document.write(%22%3C%2Ftr%3E%22)%3B%20%20%0D%0A%20%20document.write(%22%3C%2Ftable%3E%22)%3B%20%20%0D%0A%20%20document.write(%22%3Cspan%20style%3D%20cursor%3Ahand%20onclick%3Dthis.parentNode.parentNode.style.display%3D'none'%3B%3E%E6%AC%A2%E8%BF%8E%E5%85%89%E4%B8%B4%E8%84%9A%E6%9C%AC%E4%B9%8B%E5%AE%B6%5B%E7%A1%AE%E5%AE%9A%5D%3C%2Fspan%3E%22)%3B%20%20%0D%0A%20%20document.write(%22%20%20%3C%2Fdiv%3E%22)%3B%20%20%0D%0A%20%20document.write(%22%3C%2Fdiv%3E%22)%3B%20%20%0D%0A%7D%20%20%0D%0Afunction%20caoMove(obj)%20%20%2F%2F%E5%AE%9E%E7%8E%B0%E5%B1%82%E7%9A%84%E6%8B%96%E7%A7%BB%20%20%0D%0A%7B%20%20%0D%0A%20%20if(event.button%3D%3D1)%20%20%0D%0A%20%20%7B%20%20%0D%0A%20%20%20%20var%20caoX%3Dobj.clientLeft%3B%20%20%0D%0A%20%20%20%20var%20caoY%3Dobj.clientTop%3B%20%20%0D%0A%20%20%20%20obj.style.pixelLeft%3DcaoX%2B(event.x-cao_x)%3B%20%20%0D%0A%20%20%20%20obj.style.pixelTop%3DcaoY%2B(event.y-cao_y)%3B%20%20%0D%0A%20%20%7D%20%20%0D%0A%7D%20%20%0D%0A%3C%2Fscript%3E"> <img src="/_New/_cj/myeditor/sysimage/space.gif" class="ewebeditor__script" _ewebeditor_fake_tag="script" _ewebeditor_fake_value="%3Cscript%20language%3Djavascript%3E%20%20%0D%0Avar%20mycao%3Dnew%20cao888()%3B%20%20%0D%0Amycao.display()%3B%20%20%0D%0A%3C%2Fscript%3E"> </body> </html>
[Ctrl+A 全选 注:
如需引入外部Js需刷新才能执行
]
教程首页
更多教程