mvc表单的两种用法
来源:互联网 发布:软件行业人均产值 编辑:程序博客网 时间:2024/05/17 01:28
一,
html中:
<form id="form" method="post" action="/Stock/ExportAccount/">
<span style="padding-left: 5px;">类 别 </span><input type="text" id="typeId" name="typeId" class="easyui-combotree" style="width: 150px" />
<span style="padding-left: 5px">规格型号 </span><input type="text" id="model" name="model" style="width: 150px;" />
<span style="padding-left: 5px;">领用单位 </span><input type="text" id="deptId" name="deptId" class="easyui-combobox" style="width: 150px" />
<span style="padding-left: 5px">领用人 </span><input type="text" id="use" name="use" class="easyui-combobox" style="width: 150px;" />
<a id="btnSearch" class="easyui-linkbutton" data-options="iconCls:'icon-search'">查找</a>
</form>
注,<a></a>标签可以运行javascript代码,例如:<a href="javascript:$('#form')[0].submit();"></a>
js中:
$("#form")[0].submit();
controls中:
[HttpPost]
public ActionResult ExportAccount(FormCollection formC) //string typeId,string model,string deptId,string use{
string typeId = formC["typeId"];
string model = formC["model"];
string deptId = formC["deptId"];
string use = formC["use"];
}
二,
html中:
就是平常的div界面
js中:
function export_click() {
var studentNo = $("#studentNo").val();
var name = $("#name").val();
//var bj = $("#bj").val();
var dqnj = $("#dqnj").val();
var dqyx = $("#dqyx").val();
//var dqState = $("#dqState").val();
// var xsType = $("#xsType").val();
window.open("/BaseInfo/ExceptStudent/?studentNo=" + studentNo + "&name=" + name + "&dqnj=" + dqnj + "&dqyx=" + dqyx, "_parent", "");
}
control中:
public ActionResult ExportAccount(string typeId,string model,string deptId,string use)
{
}
- mvc表单的两种用法
- Spring-Mvc之表单验证的两种方式-yellowcong
- spring mvc 防止重复提交表单的两种方法,推荐第二种
- spring mvc 防止重复提交表单的两种方法,推荐第二种
- spring mvc 防止重复提交表单的两种方法,推荐第二种
- form表单的两种提交方式,submit和button的用法
- form表单的两种提交方式,submit和button的用法
- form表单的两种提交方式,submit和button的用法
- honey-----form表单的两种提交方式,submit和button的用法
- form表单的两种提交方式,submit和button的用法
- form表单的两种提交方式,submit和button的用法
- form表单的两种提交方式,submit和button的用法
- form表单的两种提交方式,submit和button的用法
- form表单的两种提交方式,submit和button的用法
- form表单的两种提交方式,submit和button的用法
- form表单的两种提交方式,submit和button的用法
- form表单的两种提交方式,submit和button的用法
- form表单的两种提交方式,submit和button的用法
- MongoDB第一天:MongoDB安装
- 关于BAPI_TRANSACTION_COMMIT一点说明
- 告诉你java在&和&&在逻辑运算上差别的原因
- unity飞机大战(3)ShareSDK分享功能
- 【转载】实时传输协议介绍:RTP协议介绍、RTCP协议介绍、RTSP协议介绍
- mvc表单的两种用法
- linux命令详解:
- 使用CocoaPods
- System.Web.HttpContext.Current.Session为NULL值的问题?
- 使用RemoteViews自定义Notification
- 其实他没那么喜欢你
- DB2(Linux 64位)安装教程
- iOS-Core-Animation-Advanced-Techniques(一)
- ssdb中TTL的使用