In this post you will understand how to create alert dialogue box using java script. This type of questions used to ask in technical round to check your programming skills. Let us see how to create alert dialogue box.
program:
<html>
<head>
<title>javascript program for an alert</title>
</head>
<body>
<script language="javascript">
alert("welcome to example of alert using javascript");
var a=confirm("GOOD BYE");
if(true)
document.write("press ok");
else
document.write("pressed cancel");
document.close();
</script>
</body>
</html>
program:
<html>
<head>
<title>javascript program for an alert</title>
</head>
<body>
<script language="javascript">
alert("welcome to example of alert using javascript");
var a=confirm("GOOD BYE");
if(true)
document.write("press ok");
else
document.write("pressed cancel");
document.close();
</script>
</body>
</html>
No comments:
Post a Comment