0
我有查詢如何驗證形式一步的步驟來驗證形式的步驟,我創建了一個表格,並在同一個頁面中的三個部分,如何一步程序
- 個人信息,
- 聯繫信息,
- 構象的細節。
我的問題是:
如果第一步的這些具體的投入都是有效的,並在#Form返回「真」,步驟二按鈕(啓動/帶你到下一個步驟)和同樣問心無愧第2步,如果所有特定的輸入都是有效的,返回真,第三步將啓動
如何當我使用jQuery驗證驗證步驟形式
我的代碼是在這裏:
$(document).ready(function() {
var navHTML = '' + ''; $(function(){
// init
$('#Form > div')
.hide()
.append(navHTML);
$('#first-step .prev-als').remove();
$('#last-step .form-next').remove();
// show first step
$('#first-step').show();
$("a.form-next").click(function() {
var whichStep = $(this).parent().parent().attr('id');
if(whichStep == 'first-step')
{
$("#first-step").validate();
if($("#form").valid()==false) return false;
//Dont navigate to second page
}
else if(whichStep == 'second-step')
{
}
else if(whichStep == 'last-step')
{
// validate last-step
}
$(this).parent().parent().hide().next().show(); });
$('a.prev-als ').click(function(){
$(this).parent().parent().hide().prev().show();
});
});
});
@RageZ:對不起大家,我無法理解他的問題,所以如果你有一些想法 – RageZ 2010-02-22 04:54:45
感謝憤怒 現在修改我的查詢,請再次檢查這一點,並很快回復我 停留在這個 – shahid 2010-02-22 05:17:16
我怎麼查詢以逐步驗證表格,我創建一個表格,它在同一頁面有三個部分 1.個人信息, 2.聯繫信息, 3.Conformation細節。 我的問題是: 如果第一步的這些具體的投入都是有效的,並在#Form返回「真」,步驟二按鈕(啓動/帶你到下一個步驟),同樣問心無愧步驟2中,如果所有的具體輸入都是有效的,返回真,第三步將啓動 如何驗證步驟的形式,當我使用jQuery驗證 – shahid 2010-02-22 05:27:03