日期:2014-05-17  浏览次数:21463 次

求助循环复选框,使后边下拉菜单灰度
这个复选框应该是从数据库中循环出来的,为了方便我写成FOR循环。
想实现勾选复选框,后边的下拉菜单变为可用。问题是1个的时候,是好用的。
2个以上,浏览器就死了。
我想是因为指定的name都是一样的问题吧。不会解决了,请哪位大哥指点一下!谢了!
<table   > <%
dim   j
for   j   =1   to   2
%>
<tr>
<td>
<input   type= "checkbox "   name= "selAnnounce "   value= "1 "   ID= "Checkbox1 "   onpropertychange= "with(DataLimit){disabled=!this.checked,style.background=!this.checked? '#ececec ': '#ffffff '}; "> &nbsp;
&nbsp; <select   name= "DataLimit "   ID= "Select1 "   disabled> <%
dim   i
for   i   =   3   to   45  
if   i   mod   3   =   0   then
response.Write( " <option   value= " " "&i& " " "> "&i& " </option> ")
end   if
next
%>
                                                                    </select>
</td>
</tr>
<%next%>
</table>

------解决方案--------------------
看看
------解决方案--------------------
onclick= "javascript:with(this.parentElement.children[1]){disabled=!this.checked,style.background=!this.checked? '#ececec ': '#ffffff '}; ">