很抱歉,如果我的帖子重复。因为我无法找到解决问题的方法。
我在这里找到了一个jQuery向导(http://www.ifadey.com/2012/06/form-to-wizard-jquery-plugin/)。
jQuery运行良好,但现在当我点击“下一步”按钮时,我想重定向到另一个页面。
的jQuery
<script>
$(function () {
var $signupForm = $('#SignupForm');
$signupForm.validationEngine();
$signupForm.formToWizard({
submitButton: 'SaveAccount',
showProgress: true, //default value for showProgress is also true
nextBtnName: 'Forward >>',
prevBtnName: '<< Previous',
showStepNo: false,
validateBeforeNext: function () {
return $signupForm.validationEngine('validate');
}
});
$('#txt_stepNo').change(function () {
$signupForm.formToWizard('GotoStep', $(this).val());
});
$('#btn_next').click(function () {
$signupForm.formToWizard('NextStep');
});
$('#btn_prev').click(function () {
$signupForm.formToWizard('PreviousStep');
});
});
</script>
ASPX
<form id="form1" runat="server">
<form id="SignupForm" action="">
<fieldset>
<legend>Account information</legend>
<label for="Name">Name</label>
<input id="Name" type="text" class="validate[required]" />
<label for="Email">Email</label>
<input id="Email" type="text" class="validate[custom[email],required]" />
<label for="Password">Password</label>
<input id="Password" type="password" />
</fieldset>
<fieldset>
<legend>Company information</legend>
<label for="CompanyName">Company Name</label>
<input id="CompanyName" type="text" class="validate[required]" />
<label for="Website">Website</label>
<input id="Website" type="text" />
<label for="CompanyEmail">CompanyEmail</label>
<input id="CompanyEmail" type="text" />
</fieldset>
<fieldset>
<legend>Billing information</legend>
<label for="NameOnCard">Name on Card</label>
<input id="NameOnCard" type="text" />
<label for="CardNumber">Card Number</label>
<input id="CardNumber" type="text" />
<label for="Address1">Address 1</label>
<input id="Address1" type="text" />
<label for="Address2">Address 2</label>
<input id="Address2" type="text" />
<label for="City">City</label>
<input id="City" type="text" />
</fieldset>
<p>
<input id="SaveAccount" type="button" value="Submit form" />
</p>
</form>
</form>
我想点击“下一步”按钮,它会重定向到网页(例如:Registration.aspx)......