日期:2014-05-16  浏览次数:20358 次

动态添加的多个select,如何判断选择值
<script language="javascript">
function addTxtProductNameBox()
  {      var oTb = document.getElementById("TableProductName");
      var oTr = oTb.insertRow();
  var newTd0 = oTr.insertCell();
  var newTd1 = oTr.insertCell();
     var newTd2 = oTr.insertCell();
  var newTd3 = oTr.insertCell();
        var newTd4 = oTr.insertCell();
  var newTd5 = oTr.insertCell();
      newTd0.innerHTML ="材料<select  id='select_cl' name='select_cl'><option value=''>请选择材料</option><option   value='单模FC/PC跳线(3-5M)'>单模FC/PC跳线(3-5M)</option><option   value='单模FC/APC跳线(3-5M)'>单模FC/APC跳线(3-5M)</option><option   value='单模SC/PC跳线(3-5M)'>单模SC/PC跳线(3-5M)</option><option   value='单模SC/APC跳线(3-5M)'>单模SC/APC跳线(3-5M)</option><option   value='单模FC/PC跳线(10M)'>单模FC/PC跳线(10M)</option</select>";
}
function returncheck()
{

}</
script>
<form id="form_add" name="form_add" method="post" action="?action=add">
<table width="100%" border="0" cellpadding="1" cellspacing="1" bgcolor="#9900FF" id="TableProductName">
          <tr>
            <td width="20%" height="24" bgcolor="#CCCCFF"><label>
            <input name="Sub_add" type="button" id="Sub_add" onClick="addTxtProductNameBox()" value="添加材料" />
            </label>
                <label>
                <label></label>
                <label></label></td>
            <td width="11%" bgcolor="#CCCCFF"><label>
              <input name="Sub_save" type="submit" id="Sub_save" value="保存" onClick="return returncheck();" />
              </label>
                <label></label></td>
            <td width="7%" bgcolor="#CCCCFF">&nbsp;</td>
            <td width="21%" bgcolor="#CCCCFF"><input name="Sub_rest" type="reset" id="Sub_rest" value="重置数据" onClick="reasetform()"/>
              <input name="hidd_anjia_id" type="hidden" id="hidd_anjia_id" /></td>
            <td width="20%" bgcolor="#CCCCFF">&n