动态添加表单里的输入框如果是下拉菜单怎么办?下菜单的选项又是从数据库里动态提取的。
怎样在提交后得到下拉菜单的值呢?
<%@LANGUAGE="VBSCRIPT" CODEPAGE="936"%>
<script language="Javascript">
function addTxtProductNameBox()
{
var oTb = document.getElementById("TableProductName");
var oTr = oTb.insertRow(0);
oTr.insertCell(0).innerHTML ="<input name='txtProductName' type='text'><input type=button onclick='return delTxtProductNameBox(this)' value='删除'>"
return false;
}
function delTxtProductNameBox(obj)
{
obj.parentElement.parentElement.removeNode(true);
return false;
}
</script>
<
<form name="form1" method="post" action="">
产品名称:<a href="#" onclick="addTxtProductNameBox()">添加产品名称</a>
<table id="TableProductName" border=0>
<tr><td> </td></tr>
</table>
<input name="submit" type="submit" id="submit" value="== 提交 ==" />
</form>
怎样在提交后得到下拉菜单的值呢?
<%@LANGUAGE="VBSCRIPT" CODEPAGE="936"%>
<script language="Javascript">
function addTxtProductNameBox()
{
var oTb = document.getElementById("TableProductName");
var oTr = oTb.insertRow(0);
oTr.insertCell(0).innerHTML ="<input name='txtProductName' type='text'><input type=button onclick='return delTxtProductNameBox(this)' value='删除'>"
return false;
}
function delTxtProductNameBox(obj)
{
obj.parentElement.parentElement.removeNode(true);
return false;
}
</script>
<
<form name="form1" method="post" action="">
产品名称:<a href="#" onclick="addTxtProductNameBox()">添加产品名称</a>
<table id="TableProductName" border=0>
<tr><td> </td></tr>
</table>
<input name="submit" type="submit" id="submit" value="== 提交 ==" />
</form>
<%for i=0 %
<option value='<%%>'></option>
<%next%>
</select>
<%for i=0 %>
<option value=' <%=%>'> </option>
<%next%>
</select>