/ Published in: JavaScript
Trivial, but meh.
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
<a href="javascript:{}" onclick="document.getElementById('theFormName').submit();">submit</a> or <a href="#" onclick="return doMyBidding();">submit</a> <script> function doMyBidding() { var answer = confirm("Are you sure you want to do my bidding?"); if (answer){ document.getElementById('theFormName').submit(); } } </script>