PROGRAM IN JAVASCRIPT 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 yahoo Homepage");
if (c== true)
{
window.location="http://www.google.co.in/";
}
else
{
window.location="http://www.yahoo.com/";
}
}
</script>
</head>
<body>
<center>
<form>
<input type="button" value="Click to chose either Google or yahoo" onclick="see()">
</form>
</center>
</body>
</html>

No comments:

Post a Comment