各位大虾...JS对我就比现在我们对外太空一样XXX!
现在有个问题..请大家给我一个答案可以么...我在线等.....谢谢..至于分嘛...我会给的
正题:
现在有A,B两个页面,在同一天内的第一次访问 ,当我打开A在关闭A弹出B;
第二次访问: 当我再次打开A,那么就不在跳到B;
我的表达能力不行还希望大家,给小菜我点意见...万分感谢
现在有个问题..请大家给我一个答案可以么...我在线等.....谢谢..至于分嘛...我会给的
正题:
现在有A,B两个页面,在同一天内的第一次访问 ,当我打开A在关闭A弹出B;
第二次访问: 当我再次打开A,那么就不在跳到B;
我的表达能力不行还希望大家,给小菜我点意见...万分感谢
Response.Cookies["vo"].Value = "go";
Response.Redirect("b.aspx");
}
呵呵,已经有人写了啊,补充一下吧。A.html<html>
<head>
<script>
function openhtml()
{
if(getCookie('jack')=='') //jack是我的名字,呵呵,随便换,就是cookie的名字
{
setCookie('jack','1','1')
window.open ('b.html','newwindow', 'height=100, width=400, top=0,left=0, toolbar=no, menubar=no, scrollbars=no, resizable=no,location=no, status=no')
//属性自己修改
}
else
{
return;
}
}
function setCookie(c_name,value,expiredays)
{
var exdate=new Date()
exdate.setDate(exdate.getDate()+expiredays)
document.cookie=c_name+ "=" +escape(value)+((expiredays==null) ? "" : ";expires="+exdate.toGMTString())
}
function getCookie(c_name)
{
if (document.cookie.length>0)
{
c_start=document.cookie.indexOf(c_name + "=")
if (c_start!=-1)
{
c_start=c_start + c_name.length+1
c_end=document.cookie.indexOf(";",c_start)
if (c_end==-1) c_end=document.cookie.length
return unescape(document.cookie.substring(c_start,c_end))
}
}
return ""
}
function deleteCookie(name)
{
var expdate = new Date();
expdate.setTime(expdate.getTime() - (86400 * 1000 * 1));
setCookie(name, "", expdate);
}
</script>
</script>
</head>
<body onunload="openhtml()">
This is a.html
<button onclick="deleteCookie('jack')">清除cookie</button>
</body>
</html>
B.html<html>
<head>
</head>
<body>
This is b.html
</body>
</html>
应该符合你的要求了~,呵呵