請問JS顯示資料的問題

edited 一月 2014 in Javascript
請問大家JS的問題
我試著做JS按"增加"按鈕會增加下拉選單及欄位資料,但是我按鈕按增加沒有反應
還請各位再給個方向喔!!!感謝各位指導
<script language="javascript"> 
	function more(){ 
	 
	 
	    nt = document.getElementById('tab').insertRow(document.getElementById('tab').rows.length-1) 
	 
	    tn = nt.insertCell(0); 
	    tt = nt.insertCell(1); 
	    ta = nt.insertCell(2); 
	 
	    tn.innerHTML = "<select name="select[]" id="select" title="<?php echo $row_p['format']; ?>"> 
	      <?php do { ?> 
	      <option value="<?php echo $row_p['Prod_name']?>" selected="selected"><?php echo $row_p['Prod_name'],'',',','',$row_p['format'],'',',','',$row_p['Weight']?></option> 
	      <?php } while ($row_p = mysql_fetch_assoc($p)); 
	                 $rows = mysql_num_rows($p); 
	                 if($rows > 0) { 
	                 mysql_data_seek($p, 0); 
	                $row_p = mysql_fetch_assoc($p); 
	                 } ?> 
	  </select>"; 
	    tt.innerHTML = "<input type='text' name='q[]' />"; 
	    ta.innerHTML = "<input type='text' name='p[]' />";     
	} 
	</script> 

評論

Sign In or Register to comment.