可能没说清楚,类似于以下:
<form method="post" name="form1" action="/one" onsubmit="callback()" class="ui-validForm container" data-validate-params="beforeSubmit:'BeforeSubmit',tipsStyle:1">
<div class="form-group">
<label class="control-label" for="S_xm">学生姓名*</label>
<div class="controls">
<input type="text" name="S_xm" id="S_xm" value="" maxlength="12" class="form-control" data-validate="dataType:'*',min:1,nullMsg:'学生姓名不能为空!'" >
<span class="help-block" id="_ValidateTips_S_xm"></span>
</div>
</div>
<div class="form-group">
<label class="control-label" for="_VerificationCode">验证码*</label>
<div class="controls">
<input type="text" id="_VerificationCode" name="_VerificationCode" class="form-control" maxlength="5" placeholder="验证码" data-validate="dataType:'*',nullMsg:'请填写验证码!',minLength:4,minLengthErrorMsg:'验证码最少4个字符!',checkUrl:'/E/VerificationCode/Validate',checkError:'验证码填写错误!'">
<img src="/E/VerificationCode/" id="_VerificationCodeImg" class="ui-verificationCodeImage" />
<span class="help-block"></span>
</div>
</div>
<div class="form-group">
<div class="controls">
@Html.AntiForgeryToken()
<input type="hidden" name="Id" id="Id" value="0" />
<input type="hidden" name="Guid" id="Guid" value="@Html.Guid()" />
<input type="hidden" name="Table" id="Table" value="class2" />
<button type="button" class="btn btn-primary ui-pagePost" data-custom-params="url:'/e/InfoData/add',callBack:'CallBack',successMsg:'提交成功'">提交</button>
</div>
</div>
<script type="text/javascript">
//提交前验证
function BeforeSubmit() {
//提交前的验证
return true;
.............
这时用什么代替UI-URL,如果用ADD好像先追加记录,不知道UI-URL可以有哪些参数。用这段代码借用表单填写检查!