我设置cookie后保存读取出来是null?cookie没有保存成功?
<script type="text/javascript">
$(function () {
if ($.cookie("email")) {
$("#email").val($.cookie("email"));
}
$("#btnSet").bind("click", function () {
if ($("#chksave").is(":checked")) {
$.cookie("email",$("#email").val(), {path: "/", expires: 7});
console.log($.cookie("email"));
}
else {
$.cookie("email",null,{path: "/"});
}
});
});