<!--如果不支持javascript 页面将跳转到Google-->
<html>
<head>
<noscript><meta http-equiv="refresh" content="0; URL=http://www.google.com"/></noscript>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title></title>
</head><body></body>
</html>
<html>
<head>
<noscript><meta http-equiv="refresh" content="0; URL=http://www.google.com"/></noscript>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title></title>
</head><body></body>
</html>
function testCookie(){
try{
document.cookie="testcookie=1; ";
if(document.cookie.indexOf("testcookie")!=-1){
return true;
}
}catch(e){}
return false;
}
</script>
但第二个是有问题的:
当我禁了Cookie后,我在我的IIS中测试,但总是true
而:我登陆CSDN是不行的.
我刚测了一下,是正常的.环境:Windows 2000 Advanced Server + IE 6.0