这是一个处理我网站弹出窗口的脚本:
<script type="text/javascript">// <![CDATA[
document.onload = checkCookie();
/**/
function getCookie(c_name)
{
var i,x,y,ARRcookies=document.cookie.split(";");
for (i=0;i<ARRcookies.length;i++)
{
x=ARRcookies[i].substr(0,ARRcookies[i].indexOf("="));
y=ARRcookies[i].substr(ARRcookies[i].indexOf("=")+1);
x=x.replace(/^\s+|\s+$/g,"");
if (x==c_name)
{
return unescape(y);
}
}
}
/**/
function setCookie()
{
var exdate=new Date();
exdate.setDate(exdate.getDate() + 300);
var c_value="newsleter_swieta_no" + ((300==null) ? "" : "; expires="+exdate.toUTCString());
document.cookie="newsletter_swieta" + "=" + c_value;
}
function timeMsg()
{
var t=setTimeout("newsletterOn()",1500);
}
/**/
function checkCookie()
{
var newsletter_swieta=getCookie("newsletter_swieta");
if (newsletter_swieta!=null && newsletter_swieta!="")
{
}
else
{
setCookie();
timeMsg();
}
}
/**/
function newsletterOn()
{
document.getElementById("white2").style.display = "block";
document.getElementById("black2").style.display = "block";
document.getElementById("wrap").style.display = "block";
}
function newsletterOff()
{
document.getElementById("white2").style.display = "none";
document.getElementById("black2").style.display = "none";
document.getElementById("wrap").style.display = "none";
}// ]]>
</script>
我想以这样的方式更改它,每次用户重新进入网站时都会出现弹出窗口。即使他的最后一次访问是在1分钟前。有谁知道怎么做?提前谢谢。