Quantcast
Channel: JavaScript alert box with confirm on button press - Stack Overflow
Viewing all articles
Browse latest Browse all 5

Answer by SLaks for JavaScript alert box with confirm on button press

$
0
0

You can write onclick="return confirm('Are you sure?');".

The confirm function shows an OK / Cancel dialog and returns true if the user clicked OK.
returning false from an onclick handler will cancel the default action of the click.


Viewing all articles
Browse latest Browse all 5

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>