struts 标签中 JSP变量的问题
如下图的循环操作,正常显示完了,点击后,为什么红色部分语句出现javaScript异常,应该怎么改?蓝色部分没有问题,为什么?请高手指点,不胜感激。
<logic:iterate id="List_st" name="TmpForm" property="List" indexId="indexId">
<html:checkbox name="list_st" property="flg" indexed="true" onclick="alert(' <%=indexId%> ')"/>
<input type="checkbox" onclick="alert(' <%=indexId%> ')"/>
</logic:iterate>
<logic:iterate id="List_st" name="TmpForm" property="List" indexId="indexId">
<html:checkbox name="list_st" property="flg" indexed="true" onclick="alert( <bean:write name='indexId'/> )"/>
<input type="checkbox" onclick="alert( <bean:write name='indexId'/> )"/>
</logic:iterate>