*<html>
<head>
<title>practise</title>
<script type="text/javascript">
function confirm() {
var r = confirm("Press the button");
if (r == true) {
alert("You are right");
} else {
alert("You are wrong");
}
}
</script>
</head>
<body>
<input type="button" name="submit" value="showtime" onclick="confirm()"/>
</div>
</body>
</html>*
I want to know what's the problem. It is not working but it is the same as in http://www.w3schools.com/js/js_popup.asp
confirm()
and it's in an infinite loop*
at the beginning and end of the documentwindow.confirm
</div>
in the <body>
<html>
<head>
<title>practise</title>
<script type="text/javascript">
function show_confirm() {
var r = confirm("Press the button");
if (r == true) {
alert("You are right");
} else {
alert("You are wrong");
}
}
</script>
</head>
<body>
<input type="button" name="submit" value="showtime" onclick="show_confirm()"/>
</body>
</html>