js问题请教,下拉菜单报错
下述是一个下拉菜单 但是有问题请懂行的人指点<script>
i = 1;
function dian_add(){
document.getElementById("d").innerHTML+='<div id="div_'+i+'">
单位:<select name="bu_men" id="bu_men">
<option value="" selected="selected">
</option><%do while not rs100.eof%>
<option value="<%=rs100("bu_men")%>"><%=rs100("bu_men")%></option>
<%rs100.movenext %>
<%loop%>
<input type="button" value="删除" onclick="del('+i+')"/>
</div>';
i = i + 1;
}
function del(o){ document.getElementById("d").removeChild(document.getElementById("div_"+o));}
</script>