日期:2014-05-16 浏览次数:20593 次
<script src="jquery.js"></script>
<script src="jquery-cookie.js"></script>
$.cookie('userId',msg.userId,{expires:7,path: '/', domain: '51wk.cn', secure: true});
/*问题:我绑定的域名:http://c2.51wk.cn/ 好像 我 alert($.cookie("userId"));
浏览器显示null,为何,请大家给我解答。多谢!*/
var expires = new Date();
expires.setTime(expires.getTime());
$.cookie('userId',msg.userId,{expires:expires.toGMTString(),path: '/', domain: '51wk.cn', secure: true});