"Calling Javascript from a html form action submit"
Bootstrap 4.1.1 Snippet by muhittinbudak

<link href="//maxcdn.bootstrapcdn.com/bootstrap/4.1.1/css/bootstrap.min.css" rel="stylesheet" id="bootstrap-css"> <script src="//maxcdn.bootstrapcdn.com/bootstrap/4.1.1/js/bootstrap.min.js"></script> <script src="//cdnjs.cloudflare.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script> <!------ Include the above in your HEAD tag ----------> <div class="container"> <div class="row"> <h2>Calling Javascript from a html form action submit</h2> <form name="myform" class="form-control" action="javascript:handleIt()"> <input name="Submit" class="btn" type="submit" value="Update"/> </form> </div> </div>
function handleIt() { alert("hello"); }

Related: See More


Questions / Comments: