I want to display the message “Hi how are you?” for 1 minute using [JavaScript][1]. After 1 minute, I’d like it to disappear. Can you help me write the code to produce this?
Edit: I have tried this code:
following is the code that i trid…
<html>
<head>
<script type="text/javascript">
function timeMsg()
{
var t=setTimeout("alertMsg()",3000);
}
function alertMsg()
{
document.write("Hellow");
}
</script>
</head>
<body>
<form> <input type="button" value="Display alert box in 3 seconds" onclick="timeMsg()"/>
</form>
</body>
</html>
1 Answer