87,904
社区成员
发帖
与我相关
我的任务
分享
function questionVal()
{
for (var i = 0; i < document.getElementById("Question1").options.length; i++) {
if(document.getElementById("Question1").options[i].value == document.getElementById("Question2").options[i].value)
{
document.getElementById("Question2").options[i].remove;
document.getElementById("Question3").options[i].remove;
}
}
}
js中怎么把这个List<> 绑定到<select name="Question2" onchange="questionVal()" style="width:153px;">
request.setAttribute('commonList',你的list);
<select>
<c:forEach var="comm" items="${commonList}">
<option value="${comm.QuestionID}">${comm.QuestionName}></option>
</c:forEach>
</select>