3
<logic:iterate id="empList" name="search" property="empList" indexId="index">

        <tr>
            <td>
                <bean:write name="empList" property="empID"/>
            </td>

            <td>
                <bean:write name="empList" property="firstName"/>
            </td>

            <td>
                <bean:write name="empList" property="lastName"/>
            </td>



            <td> 
                <html:button property="View" value="View" onclick="viewPage()"/>
                <html:button property="Update" value="Update" onclick="updateUser()"/>
                <html:button property="Delete" value="Delete" onclick="deleteUser()"/>
            </td>

        </tr>
</logic:iterate>

我想用empID 调用javascript。任何人都可以帮助我获得正确的代码语法。

4

2 回答 2

0

像这样试试。它是给你的样本。

<html:checkbox name="someList" property="someStatus" indexed="true"
 onclick="<%="javascript: changeSomeCheckBox("+index+")"%>" /> 
于 2013-11-06T06:09:58.250 回答
0

<html:checkbox name="someList" property="someStatus" indexed="true" onclick="<%="javascript: changeSomeCheckBox('+index+')"%>" /> 试试单引号

于 2015-08-06T03:52:49.867 回答