function initSelectControls() { var intRowsLen =AppGridE1.GetRowCount(); var j,intOptionCount var strProperty,strQualification,strPropertyList,strQualificationList,strPropertyHTML,strQualificationHTML; if (intRowsLen>0)//表示有行数 { for ( var i = 0; i < intRowsLen;
i++) { strProperty =AppGridE1.GetAttribute("Property", i) strQualification =AppGridE1.GetAttribute("Qualification", i) if (__mode.value == 3) { strPropertyHTML = ''; strQualificationHTML = ''; } else { strPropertyList="国有企业,民营企业,挂靠企业"; strQualificationList="特级,一级,二级,三级,四级,其他"; strPropertyHTML = ' ' + getOptionList(strProperty,strPropertyList) + ''; strQualificationHTML
= ' ' + getOptionList(strQualification,strQualificationList) + ''; } AppGridE1.GetTd(i,"Property").innerHTML = strPropertyHTML; AppGridE1.GetTd(i,"Qualification").innerHTML = strQualificationHTML; }
} } function getOptionList(strSelectValue,strValueList) { var strOptionHTML = ""; var blnSelect = false; var aryValue=strValueList.split(","); var i,intLen; intLen=aryValue.length; for (i=0;i'+ strSelectValue +''; blnSelect = true; } else { strOptionHTML +=''+
aryValue[i] +''; } } //加上空选项 if(blnSelect) { strOptionHTML = '' + strOptionHTML ; } else { strOptionHTML = '' + strOptionHTML ; } return strOptionHTML }
JS 动态加载下拉框
最新推荐文章于 2025-07-08 21:06:16 发布