<script language="javascript"> var cookies = document.cookie; var start = cookies.indexOf("cookiename="); if(start == -1){ alert("The cookie not found"); } start = cookies.indexOf("=", start) + 1; var end = cookies.indexOf(";", start); if(end == -1){ end = cookies.length; } var value = unescape(cookies.substring(start, end)); if(value == null){ alert("The cookie not found"); } else{ alert("The cookie value is:" + value); } </script> |