关于cookie中domain参数的问题
cookie 中domain参数是指定可以访问cookie的应用程序
那domain的具体格式是什么?
为什么我下面的代码中有了domain=www.xx.com后,点击
按钮alert出来的cookie中什么都没有呢?
<html>
<head>
<script type="text/javascript">
var expDate = new Date();
expDate.setTime(expDate.getTime()+12000);
document.cookie="name"+"="+"xxx"+"; expires="+expDate.toGMTString()+"; path=/"+"; domain=www.xx.com";
</script>
</head>
<body>
<input type=button value=showcookie onclick="javascript:alert(document.cookie)">
</body>
</html>