日期:2014-05-16 浏览次数:20511 次
<html>
<head>
<title> debug </title>
</head>
<body>
<script>
function myFunction()
{
document.cookie="box1=1";
document.cookie="box2=1";
alert(document.cookie);
}
</script>
<input type="checkbox" name="box" id="box1" onclick="myFunction()">点击这里</input>
</body>
</html>
function myFunction()
{
var cookies = "box1=1";
cookies += "; box2=1";
document.cookie=cookies;
alert(document.cookie);
}