using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Linq; using System.Text; using System.Windows.Forms; using System.Data.SqlClient; namespace 省市联动 { public partial class
var dropDownList= document.getElementById("<%=DropDownListID.ClientID %>");//获取DropDownList控件 var dropDownListValue = dropDownList.options[dropDownList.selectedIndex].value;//获取选择项的值 //注:DropDownListID是DropDownList控件的ID. JS验证是否有非0值: -- if
// 6.设置select中text="paraText"的第一个Item为选中 function jsSelectItemByValue(objSelect, objItemText) { //判断是否存在 var isExit = false; for (var i = 0; i < objSelect.options.length; i++) { if (objSelect.options[i].text == objItemText) { objSelect.option