javascript - How should I use a window.confirm dialog box with a form? -
i have tried window.confirm on submit button saying "are sure" if click on no submits itself? wrong way of using it?
<button type="submit" class="btn btn-primary" onclick="window.confirm('are sure want transfer user?')"> transfer </button>
use this
<form onsubmit="return confirm('are sure want transfer user?')"> </form>
Comments
Post a Comment