第一种方式: Envie 按钮 提交
<form ação = "mydemand" method = "post"> <pan> 关键字: < /span> <name de entrada = "palavras -chave" type = "text" value = "@palavras -chave" /> <input type = "submit" value = "搜索" /> < /form>
第二种方式: $ ("#dataForm"). Ajaxsubmit () 提交
<formig id = "dataForm" action = "updateUserInfo" Enctype = "Multipart/form-dados" Method = "post"> <tabela CellPadding = "0" CellSpacing = "0"> <Tbody> <tr> 名字 名字 :: </td> <td> <input Type = "text" "" nv> 名字: </td> <td> <input Type = "text" "" nv> nv value = "@model.nvc_name"/> </td> </tr> <tr> <td colspan = "2" align = "center"> <input type = "button" value = "保存" id = "btnsubmit"/> </td> </tr> 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 = " {$ ("#btnsubMit"). Clique (function () {if ($ ("[name = 'nvc_name']"). {alert (r.msg); if (r.success) {location.reload ();}})})}); </script>第三种方式: Post 提交
<tabela CellPadding = "0" CellSpacing = "0"> <Tbody> <tr> <td align = "Right"> 手机号: </td> <td> <input type = "text" placeholder = "请输入手机号" id = "nvc_user_name"/> </td> </tr> <dr> <t> <t> <t> <tghspssspn = tipsnpan = "tip"/"center =" 请输入手机号 "请输入手机号" 请输入手机号 "ALT =" NVC_USER_NAME "/> </td> </tr> <dr> <t> <t> <t> <tghspssspn) value = "保存" id = "btnsubMit"/> </td> </tr> </tbody> </tabela> <script type = "text/javascript"> $ (function () {$ ("#btnsubmit"). click (function () {var nvc_user_name = Document.getElementById ('nvc_user_name'); $. post ('/interface/modefiypwd', {nvc_user_name: nvc_user_name.value,}, function (data) {if (data.success) {$ ("#successdiv). {Layer.msg (data.msg);}});});}) </sCript>以上所述是小编给大家介绍的 mvc 中 forma 表单提交的三种方式 (推荐) , 希望对大家有所帮助 , 如果大家有任何疑问请给我留言 , 小编会及时回复大家的。在此也非常感谢大家对武林网网站的支持!