以下代码可放在一个js文件中,以便通用: //获取指定表单中指定标签对象 function getElements(formId, label) { var form = document.getElementById(formId);/* 获取表单引用(对象) */ var elements = []; var tagElements = form.getElementsByTagName(label);/* 获取表单中指定标签名的元素引用(对象)数组 */ for (var j = 0; j
var httpFormData = filterContext.HttpContext.Request.Form; var logContent = string.Empty; //获取url的 logContent = filterContext.HttpContext.Request.QueryString.ToString(); //获取表单的 if (httpFormData.Count > 0) { try { var formDataList = (from f in httpFo
// 得到一个表单里的全部信息function getFormQueryString() { var frmID=document.forms[0]; var i,queryString="",and=""; var item; // for each form's object var itemValue; // store each form object's value for(i=0;i<frmID.length;i++) { item=frmID[
代码如下: <script type="text/javascript"> // 获取指定form中的所有的<input><select>对象 function getElements(formId) { var form = document.getElementById(formId); if(form == null){ return false; } var elements = new Array(); var inputTagElemen
function getFormQueryString(frmID) { var frmID=document.getElementById(frmID); var i,queryString = "", and = ""; var item; // for each form's object var itemValue;// store each form object's value for( i=0;i<frmID.length;i++ ){ item
<html><head><title></title><script type="text/javascript"> function checkForm(){ var name=document.form1.number.value; //or form1.number.value var name=document.forms[0].number.value; var name=document.forms[0]['num