在javascript中进行cookie的读写操作
2009-11-04 22:43
525 查看
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title></title>
<script src="jquery-1.3.2-vsdoc.js" type="text/javascript"></script>
<script src="jquery.cookie.js" type="text/javascript"></script>
<script type="text/javascript">
$(function() {
$("#setcookie").click(function() {
$.cookie("test", "chenxizhang");
}); $("#getcookie").click(function() {
alert($.cookie("test"));
});
});
</script>
</head>
<body>
<form id="form1" runat="server">
<input type="button" value="设置cookie" id="setcookie"/>
<input type="button" value="读取cookie" id="getcookie"/>
</form>
</body>
</html>
<head runat="server">
<title></title>
<script src="jquery-1.3.2-vsdoc.js" type="text/javascript"></script>
<script src="jquery.cookie.js" type="text/javascript"></script>
<script type="text/javascript">
$(function() {
$("#setcookie").click(function() {
$.cookie("test", "chenxizhang");
}); $("#getcookie").click(function() {
alert($.cookie("test"));
});
});
</script>
</head>
<body>
<form id="form1" runat="server">
<input type="button" value="设置cookie" id="setcookie"/>
<input type="button" value="读取cookie" id="getcookie"/>
</form>
</body>
</html>
相关文章推荐
- JavaScript对Cookie进行读写操作实例
- 在javascript中进行cookie的读写操作
- JavaScript对Cookie进行读写操作实例
- Javascript Cookie读写删除操作的函数
- 使用JavaScript对cookie进行操作
- Javascript 读写 Cookie 操作 By shawl.qiu
- 使用javascript对cookie进行操作
- Javascript Cookie读写删除操作的函数
- 几个针对Cookie 读写操作的Javascript 函数
- Javascript对Cookie进行操作
- 使用MFC的CFile文件类和CArchive串行化类进行二进制文件读写操作
- Cookie介绍及JavaScript操作Cookie方法详解
- javascript:对DIV的基础操作,减少字符,设置Cookie,简易进度条
- JavaScript 操作 Cookie
- 使用JavaScript操作Cookie
- javascript操作cookie
- java 如何使用缓冲区对文件进行读写操作
- 转载:SQL through PowerShell 使用Powershell访问SQL并对数据进行读写增加删除操作
- java操作Cookie,进行添加、读取、删除操作
- 4000 JavaScript 操作 Cookie