<script type="text/javascript">
function setcookie(a,b,c) {if(c){var d = new Date();d.setTime(d.getTime()+c);}if(a && b) document.cookie = a+'='+b+';path=/'+(c ? '; expires='+d.toUTCString() : '');else return false;}
function getcookie(a) {var b = new RegExp(a+'=([^;]){1,}');var c = b.exec(document.cookie);if(c) c = c[0].split('=');else return false;return c[1] ? c[1] : false;}
function deletecookie( name) {if ( getcookie( name ) ) document.cookie = name + '=1; expires=Thu, 01-Jan-1970 00:00:01 GMT; path=/';}
</script>
</script>
<script type="text/javascript">
setcookie("Test",22222);
alert(getcookie("Test"))
deletecookie("Test")
alert(getcookie("Test"))
</script>
|