日期:2014-05-16 浏览次数:20843 次
<html>
<head>
<script src="../../../lib/jquery/jquery-1.7.2.js" type="text/javascript"></script>
<script src="../../jquery-cookie-master/jquery.cookie.js" type="text/javascript"></script>
<script type="text/javascript">
$(function(){
$(".a").click(function(){
$.cookie('a1',$(".a").text());
alert($.cookie('a1'));
});
});
</script>
</head>
<body>
<p class="a" style="cursor:pointer;">123</p>
</body>
</html>