【发布时间】:2011-12-17 01:34:27
【问题描述】:
我正在运行这段代码,
<html>
<head>
<title>D</title>
<script type="text/javascript" src="jQuery.js"></script>
<script type="text/javascript" src="Cookie.js"></script>
<script type="text/javascript">
$(document).ready( function() {
$.cookie("d", "1") ;
}) ;
</script>
</head>
<body>
<script type="text/javascript">
alert( $.cookie("d") ) ;
</script>
</body>
</html>
在 Firefox、IE 上显示为“1”,但在 chrome 中显示为“null”。知道为什么吗?我正在使用来自 http://plugins.jquery.com/files/jquery.cookie.js.txt 的最新 jQuery 和 cookie 插件
【问题讨论】:
标签: jquery jquery-plugins cookies