Is it possible to call a JavaScript function using return confirm();in the onclick HTML event, or do I need to execute a function that contains a confirmation and a call to another function?
<button onclick="return confirm('Are you sure?'); saveandsubmit(event);"></button>
Thanks in advance.
source
share