开发者

How to submit a form using jQuery in ASP.NET MVC 2?

开发者 https://www.devze.com 2022-12-22 06:24 出处:网络
开发者_如何转开发I want to submit a form like this: <input type=\"button\" onclick=\"$(\'#form1\').submit();\" value=\"Create\" />

开发者_如何转开发I want to submit a form like this:

<input type="button" onclick="$('#form1').submit();" value="Create" />

but the ASP.NET MVC 2 Model Validation doesn't work.


You could try simulating a click on the actual submit button:

<input type="button" onclick="$('#form1 input:submit').click();" value="Create" />
0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号