function add(name) { count += 1; var File1 = document.getElementById("file1"); var tbody = document.createElement("TBODY"); var row =document.createElement("TR"); var cell1 = document.createElement("TD"); cell1.innerHTML = name+"的浓度: " ; cell1.className = "tr2"; cell1.align = "right" ; var cell2 = document.createElement("TD") ; var inputTxt = document.createElement("input") ; inputTxt.type = "text" ; inputTxt.style.width="78" ; inputTxt.id = "txt"+count ; var selTxt = document.createElement("select") ; selTxt.id = "sel"+count ; <logic:iterate id="list" name="res" > selTxt.add(new Option("<bean:write name='list' property='value' />","<bean:write name='list' property='value' />")) </logic:iterate> cell2.appendChild(inputTxt) ; cell2.appendChild(selTxt) ; row.appendChild(cell1); row.appendChild(cell2); tbody.appendChild(row); File1.appendChild(tbody); document.getElementById("elemtcount").value=count; } JSP页面的: <table class="table" bgcolor=#FFFFFF width=100% height="100%" cellspacing=0 cellpadding=0 border=0 id="file1">