Edit This Code:
See Result »
<
!DOCTYPE
html
>
<
html
>
<
body
>
<
p
>
Click the button to display a confirm box.
<
/p
>
<
button
onclick
="myFunction()"
>
Try it
<
/button
>
<
script
>
function
myFunction() {
confirm(
"Press a button!"
);
}
<
/script
>
<
/body
>
<
/html
>
<!DOCTYPE html> <html> <body> <p>Click the button to display a confirm box.</p> <button onclick="myFunction()">Try it</button> <script> function myFunction() { confirm("Press a button!"); } </script> </body> </html>
Result:
Privacy Policy