我正在使用jquery来验证我的表单中的每个字段,并使用jquery在提交表单后显示“加载”消息。现在,在我的情况下,当我点击提交按钮时将会显示验证消息以及加载消息,我感到困惑。一旦一切正确,我只需要显示加载消息。jquery验证和提交消息
<html lang="en">
<head>
<title>SO question 3377468</title>
<script src="http://code.jquery.com/jquery-latest.min.js"></script>
<script>
$(document).ready(function() {
$('#form').submit(function() {
$('#progress').show();
});
});
</script>
<style>
#progress {
display: none;
color: green;
}
</style>
</head>
<body>
<form id="form" action="servlet-url" method="post">
...
<input type="submit">
</form>
<div id="progress">Please wait...</div>
</body>
</html>
How to show jquery message after clicking on submit button
我拿着时的一个同事曾经帮助这个代码,现在我要完成这一点。
哪里是你的验证代码? – Jhong 2010-08-01 10:48:51