0
我用我的模型DataAnnotations和JavaScript驗證工作正常,但我現在需要禁用當確認無效驗證MVC提交按鈕激活,只有當有效
這裏提交按鈕是一些示例代碼我想獲得工作
<h2>
Index</h2>
@using (Html.BeginForm())
{
@Html.ValidationSummary(true)
<fieldset>
<legend>HomeModel</legend>
<div class="editor-label">
@Html.LabelFor(model => model.Description)
</div>
<div class="editor-field">
@Html.EditorFor(model => model.Description)
@Html.ValidationMessageFor(model => model.Description)
</div>
<p>
<input type="submit" value="Save" id="submit-button" />
</p>
</fieldset>
}<div>
@Html.ActionLink("Back to List", "Index")</div>@section Scripts { @Scripts.Render("~/bundles/jqueryval")}
我需要在這個問題上的幫助http://stackoverflow.com/questions/20225962/jquery-form-disable-submit-按鈕unti 1-需要場,進入 – user3037917