日期:2014-05-18 浏览次数:20848 次
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <HTML> <HEAD> <TITLE> New Document </TITLE> <META NAME="Generator" CONTENT="EditPlus"> <META NAME="Author" CONTENT=""> <META NAME="Keywords" CONTENT=""> <META NAME="Description" CONTENT=""> <script src="linkedSelect.js"></script> <script> window.onload = function() { new linkedSelect("parent","child"); new linkedSelect("child","sun"); } </script> </HEAD> <BODY> <select id="parent"> <option class="d1">大证书1</option> <option class="d2">大证书2</option> <option class="d3">大证书3</option> </select> <select id="child"> <option class="d1_1">大证书1->小证书1</option> <option class="d1_2">大证书1->小证书2</option> <option class="d2_1">大证书2->小证书1</option> <option class="d2_2">大证书2->小证书2</option> <option class="d2_3">大证书2->小证书3</option> <option class="d2_4">大证书2->小证书4</option> <option class="d3_1">大证书3->小证书1</option> </select> <select id="sun"> <option class="d1_1_1">大证书1->小证书1->孙1</option> <option class="d1_2_1">大证书1->小证书2->孙1</option> <option class="d2_1_1">大证书2->小证书1->孙1</option> <option class="d2_1_2">大证书2->小证书1->孙2</option> </select> </BODY> </HTML>
------解决方案--------------------
this.setAttribute("zgselect2", zg2);试试
你要确定你这个里面有值的话 zgselect2 说明下面有错误
</option>
<c:forEach items="${zgselect2 }" var="zs2">
<option value="${zs2.COMP_NAME }">
${zs2.COMP_NAME }
</option>
</c:forEach>
</select>