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.
return
ing false
from an onclick
handler will cancel the default action of the click.
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.
return
ing false
from an onclick
handler will cancel the default action of the click.