资料
表格
制度
合同
管理
职场
经营
创业
范文
总结
计划
作文
文章
美文
词句
教程
模板
图片
字体
图标
办公
人事
财务
生产
管理资源吧首页
>>>
教程
>>>
编程
>>>
JavaScript教程
>>>
javascript显弹效果代码增加了cookies控制
<!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>管理资源吧 显弹效果代码</title> </head> <body> <img src="/_New/_cj/myeditor/sysimage/space.gif" class="ewebeditor__script" _ewebeditor_fake_tag="script" _ewebeditor_fake_value="%3Cscript%3E%20%0D%0A%2F%2FCookie%E8%AE%BE%E7%BD%AE%20%0D%0A%2F%2F%E6%97%B6%E9%97%B4%E8%AE%BE%E7%BD%AE%E5%B0%8F%E6%97%B6%E4%B8%BA%E5%8D%95%E4%BD%8D%20%0D%0Avar%20time%3D6%3B%20%0D%0A%0D%0A%2F%2FCOOKIES%E8%AE%BE%E7%BD%AE%E9%99%90%E5%88%B6%E5%BC%B9%E5%87%BA%20%0D%0Afunction%20SetCookie(name%2Cvalue)%7B%20%0D%0A%20%20%20%20var%20exp%20%20%3D%20new%20Date()%3B%20%20%20%20%20%0D%0A%20%20exp.setTime(exp.getTime()%20%2B%20time*6*60*60*1000)%3B%20%0D%0A%20%20%20%20var%20nameString%20%3D%20name%20%2B%20%22%3D%22%20%2B%20value%3B%20%0D%0A%20%20%20%20var%20expiryString%20%3D%20%22%20%3Bexpires%20%3D%20%22%2B%20exp.toGMTString()%3B%20%0D%0A%20%20%20%20var%20pathString%20%3D%20%22%20%3Bpath%20%3D%20%2F%22%3B%20%0D%0A%20%20%20%20%20%0D%0A%20%20%20%20document.cookie%20%3D%20nameString%20%2B%20expiryString%20%2B%20pathString%20%3B%20%0D%0A%7D%20%0D%0A%0D%0Afunction%20GetCookie%20(name)%20%7B%20%0D%0A%20%20%20%20var%20CookieFound%20%3D%20false%3B%20%0D%0A%20%20%20%20var%20start%20%3D%200%3B%20%0D%0A%20%20%20%20var%20end%20%3D%200%3B%20%0D%0A%20%20%20%20var%20CookieString%20%3D%20document.cookie%3B%20%0D%0A%20%20%20%20var%20i%20%3D%200%3B%20%0D%0A%20%20%20%20%20%0D%0A%20%20%20%20while%20(i%20%3C%3D%20CookieString.length)%20%7B%20%0D%0A%20%20%20%20start%20%3D%20i%20%3B%20%0D%0A%20%20%20%20end%20%3D%20start%20%2B%20name.length%3B%20%0D%0A%20%20%20%20if%20(CookieString.substring(start%2C%20end)%20%3D%3D%20name)%7B%20%0D%0A%20%20%20%20CookieFound%20%3D%20true%3B%20%0D%0A%20%20%20%20break%3B%20%20%0D%0A%20%20%20%20%7D%20%0D%0A%20%20%20%20i%2B%2B%3B%20%0D%0A%20%20%20%20%7D%20%0D%0A%20%20%20%20%20%0D%0A%20%20%20%20if%20(CookieFound)%7B%20%0D%0A%20%20%20%20start%20%3D%20end%20%2B%201%3B%20%0D%0A%20%20%20%20end%20%3D%20CookieString.indexOf(%22%3B%22%2Cstart)%3B%20%0D%0A%20%20%20%20if%20(end%20%3C%20start)%20%0D%0A%20%20%20%20end%20%3D%20CookieString.length%3B%20%0D%0A%20%20%20%20return%20unescape(CookieString.substring(start%2C%20end))%3B%20%0D%0A%20%20%20%20%7D%20%0D%0A%20%20%20%20return%20%22%22%3B%20%0D%0A%7D%20%0D%0Afunction%20pv_ad(i)%20%0D%0A%7B%20%0D%0Adocument.write('%3Ciframe%20width%3D0%20height%3D0%20style%3D%22display%3Anone%22%20src%3D%22'%2Bget_url(i)%2B'%22%3E%3C%2Fiframe%3E')%3B%20%0D%0A%7D%20%0D%0Afunction%20get_url(i)%20%0D%0A%7B%20%0D%0Aswitch(i)%7B%20%0D%0A%20%20%20%20case%200%3A%20%0D%0A%20%20%20%20%20%20%20%20return%20'http%3A%2F%2Fwww.glzy8.com'%3B%20%0D%0A%20%20%20%20break%3B%20%0D%0A%20%20%20%20case%201%3A%20%0D%0A%20%20%20%20%20%20%20%20return%20'http%3A%2F%2Fwww.glzy8.com%2Fjieqi2'%3B%20%0D%0A%20%20%20%20break%3B%20%0D%0A%20%20%20%20default%3A%20%0D%0A%20%20%20%20return%20'http%3A%2F%2Fwww.glzy8.com%2Fjieqi'%20%0D%0A%20%20%20%20%7D%20%0D%0A%7D%20%0D%0Afunction%20krc_open()%7Bd%3Ddxy%3Bdd%3D'document.documentElement'%3Bdd%3Deval(dd%2B'.clientWidth')%3E0%3F%20%0D%0Add%3A'document.body'%3Bddw%3Ddd%2B'.clientWidth'%3Bddl%3Ddd%2B'.scrollLeft'%3Bddt%3Ddd%2B'.scrollTop'%3Bddh%3Ddd%2B'.clientHeight'%3Bd.style.left%3Deval%20%0D%0A(ddl)%2B(eval(ddw)-d.width)%2F2%3Bd.style.top%3Deval(ddt)%2B18%3Bdxy.style.display%3D''%3B%7D%20%0D%0ApaypopupURL%3Dget_url(1)%3B%20%0D%0Aif(GetCookie('poper_yesho7')%20!%3D'true'%20%7C%7C%20GetCookie('poper_yesho7')%20%3D%3D'true')%20%0D%0A%20%20%20%20%7B%20%0D%0Adocument.write('%3Cdiv%20id%3D%22dxy%22%20style%3D%22POSITION%3A%20absolute%3Bpadding%3A0px%201px%201px%201px%3Bbackground%3Amenu%3BZ-INDEX%3A65535%3B%22%20height%3D%22500%22%20%20%0D%0Awidth%3D%22770%22%3E%3Ctable%20border%3D%221%22%3E%3Ctr%3E%3Ctd%3E%3Cdiv%20style%3D%22font-size%3A%2013px%3Bcolor%3A%20captiontext%3Bpadding%3A3px%3Bfont-weight%3A%20%20%0D%0Abold%3Bbackground%3Aactivecaption%3Bborder-bottom%3A%202px%20solid%20menu%3Btext-align%3A%20left%3B%22%3EInternet%20Explorer%3C%2Fdiv%3E%3Ciframe%20%20%0D%0Asrc%3D%22'%2BpaypopupURL%2B'%22%20marginheight%3D0%20marginwidth%3D0%20frameborder%3D0%20scrolling%3Dauto%20height%3D%22500%22%20width%3D%22770%22%20%20%0D%0A%3E%3C%2Fiframe%3E%3C%2Ftd%3E%3C%2Ftr%3E%3C%2Ftable%3E%3Cdiv%20style%3D%22position%3Aabsolute%3Btop%3A8px%3Bright%3A8px%3BCURSOR%3A%20hand%3Bfont-size%3A14px%3Bfont-weight%3A%20%20%0D%0Abold%3Bcolor%3A%23FFFFFF%3B%20FILTER%3A%20glow(color%3Dffffff%2Cstrength%3D3)%3B%22%20%20%20%0D%0Aonclick%3D%22this.style.display%3D%5C'none%5C'%3Bdxy.style.display%3D%5C'none%5C'%3B%22%3E%26gt%3B%26lt%3B%3C%2Fdiv%3E%3Cimg%20src%3D%22close.gif%22%20%20%0D%0Astyle%3D%22position%3Aabsolute%3Btop%3A8px%3Bright%3A8px%3BCURSOR%3A%20hand%3BFILTER%3A%20glow(color%3Dffffff%2Cstrength%3D1)%3B%22%20%20%0D%0Aonclick%3D%22this.style.display%3D%5C'none%5C'%3Bdxy.style.display%3D%5C'none%5C'%3B%22%3E%3C%2Fdiv%3E')%3BsetTimeout(%22krc_open()%22%2C0)%3B%20%0D%0ASetCookie('poper_yesho7'%2C'true')%3B%20%0D%0A%7Delse%7B%20%0D%0Apv_ad(1)%3B%20%0D%0A%7D%20%0D%0A%3C%2Fscript%3E"> </body> </html>
[Ctrl+A 全选 注:
如需引入外部Js需刷新才能执行
]
教程首页
更多教程