Read cookie value : Cookie : Development JAVASCRIPT TUTORIALS


JAVASCRIPT TUTORIALS » Development » Cookie »

 

Read cookie value

















<html>
<head>
<title></title>
<script language="JavaScript">
<!--
function fillIn()
{
    if (document.cookie != "")
    {
        cookieCrumb = document.cookie.split("=")[1];
        document.form1.read1.value = cookieCrumb;
    }
    else
    {
        document.form1.read1.value = "Cookie empty!";
    }
}
//  -->
</script>
</head>
<body onload="fillIn()">
<form name="form1">
<P>The username you entered was: <input type="text" name="read1"></p>
</form>
</body>
</html>







HTML code for linking to this page:

Follow Navioo On Twitter

JAVASCRIPT TUTORIALS

 Navioo Development
» Cookie