setTimeout() performs action after specified time like calling function , evaluating expressions etc.
<html>
<head>
<script type="text/javascript">
function test()
{
setTimeout(
function()
{
alert("Me aaya bas 2 seconds me, LoL")
},2000);
}
</script>
</head>
<body>
<input type="button" value="setTimeout" onclick="test()"/>
</body>
</html>
No comments:
Post a Comment