我有此代码引用我网站上的表单来创建 cookie
<script type="text/javascript">
function storeValues(form)
{
setCookie("signup[email]", form.signup[email].value);
return true;
}
虽然没有创建cookie!有任何想法吗??
网址:aximit.com/wifi/pagecookie.php
编辑这里是方法:
<script type="text/javascript">
var today = new Date();
var expiry = new Date(today.getTime() + 30 * 24 * 3600 * 1000); // plus 30 days
function setCookie(name, value)
{
document.cookie=name + "=" + escape(value) + "; path=/; expires=" + expiry.toGMTString();
}