首页 »Javascript教程 » phpcookie倒计时:设置下载不需要倒计时cookie(倒计时代码) »正文phpcookie倒计时:设置下载不需要倒计时cookie(倒计时代码)来源: 发布时间:星期四, 2008年12月25日 浏览:158次 评论:0
<!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; char ![]() <meta http-equiv="Content-Language" content="gb2312" /> <title>下载地址页面</title> <script type="text/javascript"> //20080824设置下载不需要倒计时cookie document.cookie="downvip=888"; String.prototype.trim = function ![]() { ![]() } var IE_all_cache = ![]() ![]() function IE_getElementById(id) { ![]() ![]() { IE_all_cache[id] = document.all[id]; } ![]() } ![]() { ![]() { document.getElementById = IE_getElementById; } } function waitForDownload ![]() { ![]() { document.getElementById("wait_to_download").style.display = 'none'; document.getElementById("download_link").style.display = 'inline'; clearInterval(downloadTimer); } ![]() { document.getElementById("re ![]() } waitingTime --; } ![]() { window.parent.location = window.location; } </script> </head> <body> <div ![]() </div> <div ![]() <span id="wait_to_download">下载地址列表载入中 <span id="re ![]() <span id="download_link" style="display: none; "> <a href="http://www.jb51.net">脚本的家</a> </span> </div> <script type="text/javascript"> var waitingTime = 10; var downloadTimer = ![]() ![]() //Hash 判断是否需要倒计时 ![]() ![]() waitingTime = 0; //cookie判断是否需要倒计时 //获取cookie ![]() var strCookie=document.cookie; //将多cookie切割为多个名/值对 var arrCookie=strCookie.split("; "); var downvip; //遍历cookie ![]() ![]() for(var i=0;i<arrCookie.length;i ![]() var arr=arrCookie[i].split("="); //找到名称为downvip ![]() ![]() ![]() ![]() ![]() downvip=arr[1]; ![]() } } ![]() ![]() waitingTime = 0; } </script> </body> </html> 0
相关文章读者评论发表评论 |