$('#formid').submit(function() { alert('I am submitted'); return false; });
<!DOCTYPE html>
<html>
<head>
<script src="http://code.jquery.com/jquery-latest.js"></script>
</head>
<body>
<div id="container">
<form action="submit.php">
<div>
<input type="submit" />
</div>
</form>
<span></span>
<script>
$("form").submit(function() {
alert("This is a submit");
return false;
});
</script>
</div>
</body>
</html>
No comments:
Post a Comment