第一种方式 : Soumettre 按钮 提交
<form action = "mydemand" method = "post"> <span> 关键字 : </span> <input name = "keywords" type = "text" value = "@ keywords" /> <input type = "soume" value = "搜索" /> </ form>
第二种方式 : $ ("# dataform"). AjaxSubmit () 提交
<form id = "dataform" Action = "updateUserInfo" ENCTYPE = "multipart / form-data" méthode = "Post"> <table CellPadding = "0" CellSpacing = "0"> <tbody> <tr> <Td> 名字 : : </ td> <td> <entrée Type = "Text" Name = "NVC_NAME" ID = "NVC_NAME" Value = "@ Model.nvc_name" /> </td> </ tr> <tr> <td Colspan = "2" Align = "Center"> <Input Type = "Button" Value = "保存" id = "btnsubmit" /> </td> </tr> </body> </plow> </ form> <script src = "http://code.jquery.com/jquery-1.11.0.min.js"> </ script> <script src = "http://malsup.github.io/jquery.form.js"> </ script> // ajaxform 依赖脚本 <script type = "text / javascript"> $ (document). {$ ("# btnsubmit"). cliquez sur (fonction () {if ($ ("[name = 'nvc_name']"). val () == "") {alert ("请填写名字"); $ ("[name = 'nvc_name']"). focus (); return;} $ ("# dataform"). (R.Success) {location.reload ();}})})}); </script>第三种方式 : Post 提交
<table cellpadding = "0" CellSpacing = "0"> <tbody> <tr> <td align = "droite"> 手机号 : </td> <td> <entrée type = "text" placeholder = "请输入手机号" id = "nvc_user_name" /> </ td> </tr> <tr> <td colpan = "2" align = "Centre"> </pant = bouton " value = "保存" id = "btnsubmit" /> </td> </tr> </tbody> </ table> <script type = "text / javascrip Document.getElementById ('nvc_user_name'); $. Post ('/ interface / modefiypwd', {nvc_user_name: nvc_user_name.value,}, function (data) {if (data.succress) {$ ("# successdiv"). {couche.msg (data.msg);}});});}) </ script>以上所述是小编给大家介绍的 MVC 中 Forme 表单提交的三种方式 (推荐) , 希望对大家有所帮助 , 如果大家有任何疑问请给我留言 , 小编会及时回复大家的。在此也非常感谢大家对武林网网站的支持!