我正在使用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