好得很程序员自学网

<tfoot draggable='sEl'></tfoot>

jQuery设置的本地Cookie别的页面能访问吗?_html/css_WEB-ITnose

用的是html +jquery做的一个小东西 需要实现页面间的数据共享


回复讨论(解决方案)

设置path路径为/是可以的。但必须是同一个域名下的Cookie才可以

作用域下的页面都可以访问
http://HdhCmsTestcnblogs测试数据/chenqianpeng/archive/2012/04/24/2468642.html

用的是html +jquery做的一个小东西 需要实现页面间的数据共享



if($('#materialId').val()!=0){
var materialId = $('#materialId').val();
$.cookie("A",AK[materialId][0],{path:'/'});//把A的值cookie中
$.cookie("K",AK[materialId][1],{path:'/'});
alert($.cookie("A"));
//alert();
提示的值是那个undefined 不知道哪里出错 我完全没有用到服务器

查看更多关于jQuery设置的本地Cookie别的页面能访问吗?_html/css_WEB-ITnose的详细内容...

  阅读:93次