el表达式做script函数的参数问题,我将el表达式(${house.hid})做script函数的参数传入,却导致script函数无响应。
----------------------------------------
jsp页面代码:
<c:forEach var="house" items="${requestScope.houseList}">
<tr>
<td>
<a href="javascript:formSubmit('house.do','${house.hid}','houseDetail','myForm')">${house.hname}</a>
<a href="javascript:aa(${house.hid})">${house.hid}</a> <!-- 此处测试都无响应 -->
</td>
</tr>
----------------------------------------
script函数:
function formSubmit(actionUrl,hid,operType,formID){
alert('formSubmit');
document.getElementById(formID).action=actionUrl;
document.getElementById(formID).hid.value=hid;
document.getElementById(formID).operType.value=operType;
alert('action='+action+'|hid='+hid+'|operType='+operType);
document.getElementById(formID).submit();
}
function test(hid){ //test做测试用
alert(hid);
}
----------------------------------------
jsp页面代码:
<c:forEach var="house" items="${requestScope.houseList}">
<tr>
<td>
<a href="javascript:formSubmit('house.do','${house.hid}','houseDetail','myForm')">${house.hname}</a>
<a href="javascript:aa(${house.hid})">${house.hid}</a> <!-- 此处测试都无响应 -->
</td>
</tr>
----------------------------------------
script函数:
function formSubmit(actionUrl,hid,operType,formID){
alert('formSubmit');
document.getElementById(formID).action=actionUrl;
document.getElementById(formID).hid.value=hid;
document.getElementById(formID).operType.value=operType;
alert('action='+action+'|hid='+hid+'|operType='+operType);
document.getElementById(formID).submit();
}
function test(hid){ //test做测试用
alert(hid);
}
楼主【ty110119120】截止到2008-07-20 11:14:20的历史汇总数据(不包括此帖):
发帖的总数量:0 发帖的总分数:0 每贴平均分数:0
回帖的总数量:0 得分贴总数量:0 回帖的得分率:0%
结贴的总数量:0 结贴的总分数:0
无满意结贴数:0 无满意结贴分:0
未结的帖子数:0 未结的总分数:0
结贴的百分比:---------------------结分的百分比:---------------------
无满意结贴率:---------------------无满意结分率:---------------------
如何结贴请参考这里:http://topic.csdn.net/u/20080501/09/ef7ba1b3-6466-49f6-9d92-36fe6d471dd1.html