JS动态添加JSP<from:select><form:option></form:option></from:select>
<td colspan="3" align="center"> <form:select path="goods" class="input-xlarge "> <form:option value="" label="请选择"/> <form:options items="${goodsL}" itemLabel="gname" itemValue="id" htmlEscape="false"/> </form:select> </td>
)
括号里是我写的下拉框,我想把它写成JS动态添加,跟我写的JS最好一样,JS是用 innerHTML动态添加的,可是我怎么写都不对,请你们用innerHTML来写动态添加下拉框!
BUT:Because some SB often give an irrelevant answer so please, please go to the side of SB(中式英语(注释:SB 就是 SB)仅此而已) 展开
- 你的回答被采纳后将获得:
- 系统奖励15(财富值+成长值)+难题奖励30(财富值+成长值)
2015-08-17
var s = "后天传出的json字符串";
var jo = JSON.parse(json);
for(//jo){
//添加到select中
}
document.getElementById("divID").innerHTML="<iframe src='b.jsp></iframe>'
<tr class="parityTableTH"><td rowspan=1>行号</td>
<logic:equal name="pdpSessionForm" property="col_req_t" value="on"><td nowrap ><img src=<c:url value='images/sort_up.gif'/>" onClick="return sortAs('req_t','desc');" style='cursor:hand' a<img sr<c:url value='images/sort_down.gif'/>" onClick="return sortAs('req_t','asc');" style='cursor:hand' alt="排序"></td></logic:equal>
<tr class="parityTableTH"><td rowspan=1>行号</td>var col = "req_t";var code = "";code += "<logic:equal name=\"pdpSessionForm\" property=\"col_" + col +"\" value=on>";;code += "<td nowrap >";code += "<img src=\"<c:url value='images/sort_up.gif'/>\" onClick=\"return sortAs('" + col +"','desc');\" style='cursor:hand' alt=\"排序\">";code += col;code += "<img src=\"<c:url value='images/sort_down.gif'/>\" onClick=\"return sortAs('" + col +"','asc');\" style='cursor:hand' alt=\"排序\">"。