标签:add option put function com city js代码 middle ted
<tr>
<td align="right">所在省:</td>
<td>
<select id="unitProvince" name="unitProvince" onchange="selectCompanyAddress2();selectCompanyAddress3();">
<option value=" " selected="selected">请选择所在省份</option>
</select>
</td>
<td align="right" valign="middle">所在市:</td>
<td>
<select id="unitCity" name="unitCity" onchange="selectCompanyAddress3()">
</select>
</td>
</tr>
<tr>
<td align="right" >所在区:</td>
<td>
<select id="unitStreat" name="unitStreat">
</select>
</td>
<td align="right">详细地址:</td>
<td>
<input type="text" id="unitAddress" name="unitAddress">
</td>
</tr>
//js代码================
function selectCompanyAddress1(){
var url=‘<%=basePath%>xyData/dict/LoadChildSellect.do?fid=‘;
HydUtilLoadChildSellect(url,$("#unitProvince"),"99996","");
}
function selectCompanyAddress2(){
var url=‘<%=basePath%>xyData/dict/LoadChildSellect.do?fid=‘;
HydUtilLoadChildSellect(url,$("#unitCity"),"99996",$("#unitProvince").val());
}
function selectCompanyAddress3(){
var url=‘<%=basePath%>xyData/dict/LoadChildSellect.do?fid=‘;
if(null!=$("#unitProvince").val() && ""!=$("#unitProvince").val()) {
//查询字典获取内容
HydUtilLoadChildSellect(url, $("#unitStreat"), "99996", $("#unitCity").val());
}
}
标签:add option put function com city js代码 middle ted
原文地址:https://www.cnblogs.com/xianz666/p/12182458.html