创建隐藏字段
Response.Write "<input ID='hdnVendorNumber' NAME='hdnVendorNumber' TYPE='HIDDEN' >"
Response.Write "<input ID='hdnDocumentID' NAME='hdnDocumentID' TYPE='HIDDEN' >"
Response.Write "<input ID='hdnOrderBy' NAME='hdnOrderBy' TYPE='HIDDEN' >"
Response.Write "<input ID='hdnQuerying' NAME='hdnQuerying' TYPE='HIDDEN' >"
提交表单的函数
function SubmitForm(intOrder)
{
var form = document.getElementById("frmVendorDocs");
form.hdnVendorNumber.value="900999";
form.hdnQuerying.value="True";
form.hdnDocumentID.value="";
form.hdnOrderBy.value=intOrder;
form.submit();
}
我遇到的问题是每次运行 form.submit() 时,我的隐藏字段都不会保留我设置的值,而是设置为“”。如何在每次运行 form.submit() 时保留我设置隐藏字段的值?