Saturday, June 23, 2012

how to create cookies in javascript

how to set cookie in javascript
how to get cookie value in javascript

<script src=""></script>

function setCookie(){
 alert('cookies Successfully set');

function getCookie(){
 var cv = document.cookie.split( ';');
 alert(cv[0]);  // get cookies value


 <input type="button" value="setCookie" onclick="setCookie();"  name="setcookie" />

 <input type="button" name="getcookie" value="getcookie" onclick="getCookie();"  />

No comments:

Post a Comment

If you Satisfied , Please Leave a comment