jsp 变量问题
如下图的循环操作,为什么红色的都不对,应该怎么改?蓝色的为什么是对的?请高手指点,不胜感激。
<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>