一、页面传值(用于表单提交)
其实这个有好多的方法
a、<input type="hidden" runat="server" id="xxx">给这个隐藏域赋值然后后台xxx.value就可以拿到了。
b、或者直接 window.location="你当前页面?xxx=你传的值" 后台 Request["xxx"]也可以拿到
![](https://images.cnblogs.com/OutliningIndicators/ContractedBlock.gif)
function addUser() { var url = "userEdit.aspx?orgId=" + $("#hideOrgID").val(); window.location.href = url; }
![](https://images.cnblogs.com/OutliningIndicators/ContractedBlock.gif)
<script type="text/javascript"> $(function () { QueryForm(); }); function QueryForm() { var queryParams = { orgID: "", txtUserName: "", txtFullName: "", selSex: "", selStatus: "", selJob: "", checkStatus: "" }; queryParams.orgID = $("#hideOrgID").val(); queryParams.txtUserName = $("#txtUserName").val(); queryParams.txtFullName = $("#txtFullName").val(); queryParams.selSex = $("#selSex").combobox('getValue'); queryParams.selStatus = $("#selStatus").combobox('getValue'); queryParams.selJob = $("#selJob").combobox('getValue'); datagridHelper.bind($("#dgData"), 'userlist.aspx/Query', queryParams); queryParams.checkStatus = $("input[type='checkbox']").is(':checked'); } </script>