JavaScript Popup Window Program
JavaScript Popup Window Program
This is a simple JavaScript example program to generate confirm box.
<html>
<head>
<script type="text/javaScript">
function see()
{
var c= confirm("Click OK to see Google Homepage or CANCEL to see Bing Homepage");
if (c== true)
{
window.location="http://www.google.co.in/";
}
else
{
window.location="http://www.gmail.com/";
}
}
</script>
</head>
<body>
<center>
<form>
<input type="button" value="Click to chose either Google or gmail" onclick="see()">
</form>
</center>
</body>
</html>
Best of Luck
This is a simple JavaScript example program to generate confirm box.
<html>
<head>
<script type="text/javaScript">
function see()
{
var c= confirm("Click OK to see Google Homepage or CANCEL to see Bing Homepage");
if (c== true)
{
window.location="http://www.google.co.in/";
}
else
{
window.location="http://www.gmail.com/";
}
}
</script>
</head>
<body>
<center>
<form>
<input type="button" value="Click to chose either Google or gmail" onclick="see()">
</form>
</center>
</body>
</html>
Best of Luck
Comments