<html>
<head>
<script type="text/javascript">
function show_confirm()
{
var p=confirm("Click button");
if (p==true)
{
alert("OK");
}
else
{
alert("Cancel");
}
}
</script>
</head>
<body>
<input type="button" onclick="show_confirm()" value="Show a confirm box" />
</body>
</html>
<head>
<script type="text/javascript">
function show_confirm()
{
var p=confirm("Click button");
if (p==true)
{
alert("OK");
}
else
{
alert("Cancel");
}
}
</script>
</head>
<body>
<input type="button" onclick="show_confirm()" value="Show a confirm box" />
</body>
</html>
No comments:
Post a Comment