use javascript settimeout() method just to execute a method after some interval of time
the syntax to use this is :
setTimeout(code,millisec)
Example :
<html>
<head>
<script type="text/javascript">
function timedMsg()
{
var t=setTimeout("alert('I am displayed after 3 seconds!')",3000)
}
</script>
</head>
<body>
<form>
<input type="button" value="Display timed alertbox!" onclick="timedMsg()" />
</form>
</body>
</html>
No comments:
Post a Comment