java socket 端口 耗尽:初学 javascript 简单问题

来源:百度文库 编辑:高校问答 时间:2024/04/28 03:55:05
function add_fn(){
var table, row, cell, material_count, selectObj;
var table, row, cell, material_count, selectObj;
table = document.getElementById('table1');
table.insertRow();
table.moveRow(table.rows.length - 2, table.rows.length - 1);
row = table.rows[table.rows.length - 2];
cell = row.insertCell();
cell.bgColor ="#D0D0FF";
cell.innerHTML = '<select name="material"id="material"></select>';
material_count=material_count+1
selectObj.options[selectObj.options.length]= new Option('ss','dd');
selectObj.options[selectObj.options.length]= new Option('www','aaaa');
selectObj.options[selectObj.options.length]= new Option('rrrrrr','aaaaaa');

}
为什么添加不上去 我想用一个按钮添加一个select 添加后是空的