7
function ArrayClass2()
{
var temList=new Array();
temList["安徽"]=['池州','合肥','宣城','蚌埠','淮南','安庆'];
temList["河南"]=['郑州','焦作','洛阳'];
temList["陕西"]=['西安','汉中','咸阳','延安'];
temList["江苏"]=['南京','苏州','义乌 ','扬州'];
var tIndex=document.getElementById ("ddlStartSitePro").value;
var newOption2;
document.getElementById ("ddlStartSiteCity").length=0;
for(var h in temList[tIndex])
{
newOption2=new Option(temList[tIndex][h],temList[tIndex][h]);
document.getElementById ("ddlStartSiteCity").options.add(newOption2);
document .getElementById ("ddlStartSiteCity").value =newOption2;
}
document .getElementById ("ddlStartSiteCity").selectedIndex =0;
}
siteModel.Startsitepro = ddlStartSitePro.Value;
siteModel.Startsitecity = ddlStartSiteCity.Value;
省可以插入库中,市不行(“请选择市”),这可如何是好?急!望大虾解答
给你出个有点馊的主意:实在取不到就在页面中增加一个hidden标签吧,设置runat="server",当下拉框改变后,将值赋予hidden,保存的时候从hidden里面取