<!doctype html>
<html>
<head>
<title>Display Message</TITLE>
</HEAD>
<body>
<h1> Display Message </h1>
<form name="f1">
<input type="submit" value="Display Message" onClick="display()">
</form>
</body>
<script language="Javascript">
function display()
{
window.setTimeout(msg(),2000);
}
function msg()
{
alert("Hello.....After 2000MS");
}
</script>
</html>