|
<html>
<input type = "hidden" id = "flag" value = "0" />
<script language = javascript>
function test ()
{
var flag = document.getElementById ("flag");
if (flag.value == "0")
{
// first time
alert ("first time");
flag.value = "1";
}
else
{
alert ("not first time");
}
}
</ script>
<body onload = "test ();">
</ html> |
|