无为清净楼资源网 Design By www.qnjia.com
mvc中form表单提交的几种形式
第一种方式:submit 按钮 提交
<form action="MyDemand" method="post"> <span>关键字:</span> <input name="keywords" type="text" value="@keywords" /> <input type="submit" value="搜索" /> </form>
第二种方式: $("#dataform").ajaxSubmit() 提交
<form id="dataform" action="UpdateUserInfo" enctype="multipart/form-data" method="post"> <table style="width:100%;border:0;" cellpadding="0" cellspacing="0"> <tbody> <tr> <td width="40">名字:</td> <td><input 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> </tbody> </table> </form>
<script src="/UploadFiles/2021-04-02/jquery-1.11.0.min.js">第三种方式:post 提交
<table style="width:100%;border:0px;" cellpadding="0" cellspacing="0"> <tbody> <tr> <td width="15%" align="right">手机号:</td> <td><input type="text"placeholder="请输入手机号" id="nvc_user_name"/></td> </tr> <tr> <td colspan="2" align="center"> <input type="button" value="保存" id="btnsubmit" /> </td> </tr> </tbody> </table><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").show(); $("#editdiv").hide(); } else { layer.msg(data.Msg); } }); }); }) </script>第四种方式:为from 中的button 添加 onclick事件 验证表单 后提交
<form method="post" action="RecordEdit" id="dataForm"> <table width="100%" border="0" cellspacing="0" cellpadding="0"> <tr> <td align="right">应用路径:</td> <td> <input type="text" name="nvc_app_path" id="nvc_app_path" > </td> </tr> <tr class="b_tr2"> <td><input type="button"onclick="CheckForm();" value="保存"></td> </tr> </table> </form><script src="/UploadFiles/2021-04-02/jquery.js">感谢阅读,希望能帮助到大家,谢谢大家对本站的支持!
无为清净楼资源网 Design By www.qnjia.com
广告合作:本站广告合作请联系QQ:858582 申请时备注:广告合作(否则不回)
免责声明:本站文章均来自网站采集或用户投稿,网站不提供任何软件下载或自行开发的软件! 如有用户或公司发现本站内容信息存在侵权行为,请邮件告知! 858582#qq.com
免责声明:本站文章均来自网站采集或用户投稿,网站不提供任何软件下载或自行开发的软件! 如有用户或公司发现本站内容信息存在侵权行为,请邮件告知! 858582#qq.com
无为清净楼资源网 Design By www.qnjia.com
暂无评论...
更新日志
2024年09月27日
2024年09月27日
- Sweety.2006-花言乔语【丰华】【WAV+CUE】
- 李恕权.2003-回·20年全精选2CD【SONY】【WAV+CUE】
- 赞多《序章》[FLAC/分轨][129.13MB]
- 群星《完美的她 影视原声带》[320K/MP3][51.98MB]
- 群星《完美的她 影视原声带》[FLAC/分轨][141.05MB]
- 山风点伙.1997-深藏不露【立得】【WAV+CUE】
- 李幸倪.2018-First.Of.All.Live.Concert.3CD(2024环球红馆40复刻系列)【环球】【WAV+CUE】
- 李恕权.2003-回·20年全精选2CD【SONY】【WAV+CUE】
- 群星《你就在我身边 电影原声专辑》[320K/MP3][26.68MB]
- 群星《你就在我身边 电影原声专辑》[FLAC/分轨][70.27MB]
- 班得瑞原装进口《20周年精选集》1CD[APE/CUE分轨][303MB]
- 群星.2009-NOON.D.广东.2CD【新世纪】【WAV+CUE】
- 洪卓立.2012-GROWN.UP【英皇娱乐】【WAV+CUE】
- 梁静茹.2007-崇拜【相信音乐】【WAV+CUE】
- 金佩姗.1997-喜新恋旧【现代派】【WAV+CUE】