资料
表格
制度
合同
管理
职场
经营
创业
范文
总结
计划
作文
文章
美文
词句
教程
模板
图片
字体
图标
办公
人事
财务
生产
管理资源吧首页
>>>
教程
>>>
编程
>>>
JavaScript教程
>>>
JS模仿MSN右下角弹出提示框代码
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=gb2312" /> <title>aa</title> <style type="text/css"> * { margin: 0px; padding: 0px; } html, body { height: 100%; } body { font-size: 14px; line-height: 24px; } #tip { position: absolute; right: 0px; bottom: 0px; height: 0px; width: 180px; border: 1px solid #CCCCCC; background-color: #eeeeee; padding: 1px; overflow: hidden; display: none; font-size: 12px; z-index: 10; } #tip p { padding: 6px; } #tip h1, #detail h1 { font-size: 14px; height: 25px; line-height: 25px; background-color: #0066CC; color: #FFFFFF; padding: 0px 3px 0px 3px; filter: Alpha(Opacity=100); } #tip h1 a, #detail h1 a { float: right; text-decoration: none; color: #FFFFFF; } </style> <img src="/_New/_cj/myeditor/sysimage/space.gif" class="ewebeditor__script" _ewebeditor_fake_tag="script" _ewebeditor_fake_value="%3Cscript%20type%3D%22text%2Fjavascript%22%3E%20%0D%0Awindow.onload%3Dfunction()%20%0D%0A%7B%20%0D%0Avar%20divTip%20%3D%20document.createElement(%22div%22)%3B%20%0D%0AdivTip.id%3D%22tip%22%3B%20%0D%0AdivTip.innerHTML%3D%22%3Ch1%3E%3Ca%20href%3D'javascript%3Avoid(0)'%20onclick%3D'start()'%3E%C3%97%3C%2Fa%3Easdf%3C%2Fh1%3E%3Cp%3E%3Ca%20href%3D'javascript%3Avoid(0)'%20onclick%3D'showwin()'%3Easdf%3C%2Fa%3E%3C%2Fp%3E%22%3B%20%0D%0AdivTip.style.height%3D'0px'%3B%20%0D%0AdivTip.style.bottom%3D'0px'%3B%20%0D%0AdivTip.style.position%3D'fixed'%3B%20%0D%0Adocument.body.appendChild(divTip)%3B%20%0D%0A%7D%20%0D%0Avar%20handle%3B%20%0D%0Afunction%20start(count)%20%0D%0A%7B%20%0D%0Avar%20obj%20%3D%20document.getElementById(%22tip%22)%3B%20%0D%0Aif%20(parseInt(obj.style.height)%3D%3D0)%20%0D%0A%7B%20obj.style.display%3D%22block%22%3B%20%0D%0Ahandle%20%3D%20setInterval(%22changeH('up')%22%2C20)%3B%20%0D%0A%7Delse%20%0D%0A%7B%20%0D%0Ahandle%20%3D%20setInterval(%22changeH('down')%22%2C20)%20%0D%0A%7D%20%0D%0A%7D%20%0D%0Afunction%20changeH(str)%20%0D%0A%7B%20%0D%0Avar%20obj%3Ddocument.all%3Fdocument.all%5B%22tip%22%5D%20%3A%20document.getElementById(%22tip%22)%3B%20%0D%0Aif(str%3D%3D%22up%22)%20%0D%0A%7B%20%0D%0Aif%20(parseInt(obj.style.height)%3E100)%20%0D%0AclearInterval(handle)%3B%20%0D%0Aelse%20%0D%0Aobj.style.height%3D(parseInt(obj.style.height)%2B8).toString()%2B%22px%22%3B%20%0D%0A%7D%20%0D%0Aif(str%3D%3D%22down%22)%20%0D%0A%7B%20%0D%0Aif%20(parseInt(obj.style.height)%3C8)%20%0D%0A%7B%20%0D%0AclearInterval(handle)%3B%20%0D%0Aobj.style.display%3D%22none%22%3B%20%0D%0A%7D%20%0D%0Aelse%20%0D%0Aobj.style.height%3D(parseInt(obj.style.height)-8).toString()%2B%22px%22%3B%20%0D%0A%7D%20%0D%0A%7D%20%0D%0Afunction%20showwin()%20%0D%0A%7B%20%0D%0Adocument.getElementsByTagName(%22html%22)%5B0%5D.style.overflow%20%3D%20%22hidden%22%3B%20%0D%0Astart()%3B%20%0D%0Awindow.open(%22http%3A%2F%2Ftools.glzy8.com%22)%3B%20%0D%0A%7D%20%0D%0A%3C%2Fscript%3E"> </head> <body> <a href="javascript:void(0)" _ewebeditor_ta_href="javascript%3Avoid(0)" onclick="start()">click</a> </body> </html>
[Ctrl+A 全选 注:
如需引入外部Js需刷新才能执行
]
教程首页
更多教程