jquery onclick button post
<!DOCTYPE html>
<html>
<head>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script>
<script>
$(document).ready(function(){
$(function() {
$('#submit1').click(function(e) {
e.preventDefault();
$("#Demo").submit();
});
$('#submit2').click(function(e) {
e.preventDefault();
$("#Demo").submit();
});
});
});
</script>
</head>
<body>
<form action="javascript:alert('submitted');" method="post" id="Demo">
<label>Team</label>
<input type="text" name="name" value="" />
<input type="submit" name="submitme" value="Submit" id="submit1" />
<p><a href="#" id="submit2">Submit</a></p>
</form>
</body>
</html>