日期:2014-05-17 浏览次数:21239 次
多级联动下拉选择框,动态获取下一级,每一级数据为XML,可支持无限级(浏览器端需要Microsoft.XMLDOM支持)</p>
<select name="MaterialClass1" ChildSelectName="MaterialClass2"></select>
<select name="MaterialClass2" ChildSelectName="MaterialClass3"></select>
<select name="MaterialClass3"></select>
<select name="MaterialClass1" onchange="scs(this.value,'MaterialClass2')" ChildSelectName="MaterialClass2" val="02"></select>
<select name="MaterialClass2" onchange="scs(this.value,'MaterialClass3')" ChildSelectName="MaterialClass3" val="31"></select>
<select name="MaterialClass3" val="33"></select>
<script type="text/javascript">
var loadXML = function(xmlFile) {
var xmlDoc;
if(window.ActiveXObject){
xmlDoc = new ActiveXObject('Microsoft.XMLDOM');
xmlDoc.async = false;
xmlDoc.load(xmlFile);
}else if (document.implementation&&document.implementation.createDocument){
xmlDoc = document.implementation.createDocument('', '', null);
xmlDoc.load(xmlFile);
}else {
&n