表格中的一行数据双击,就进入修改界面无论点击这行的那条数据,都要进入点击这条数据的修改界面,,怎么做
<table width="332" height="62" border="1" align="center">
<tr class="th2" align="center">
<td width="26"><img src="..\images\garrow.gif"></td>
<td width="124">区分</td>
<td width="160">总数</td>
</tr>
<s:iterator value="totalList">
<tr class="th1" align="center"
onMouseOver="this.style.background='#AFC9E3'"
onmouseout="this.style.background=''">
<td><img src="..\images\garrow.gif"></td>
<td>&nbsp;<s:property value="pc_type"></s:property></td>
<td><s:property value="total_count"></s:property></td>
</tr>
</s:iterator>
</table>

解决方案 »

  1.   


    <table width="332" height="62" border="1" align="center">
        <tr class="th2" align="center">
            <td width="26"><img src="..\images\garrow.gif"></td>
            <td width="124">区分</td>
            <td width="160">总数</td>
        </tr>
        <s:iterator value="totalList">
            <tr class="th1" align="center"
                onMouseOver="this.style.background='#AFC9E3'"
                onmouseout="this.style.background=''"
                ondblclick="javascript: window.location='你的修改页面的url.jsp?id=<s:property value="主键"/>'"> //这里有修改
                <td><img src="..\images\garrow.gif"></td>
                <td>&nbsp;<s:property value="pc_type"></s:property></td>
                <td><s:property value="total_count"></s:property></td>
            </tr>
        </s:iterator>
    </table>
      

  2.   

    <tr onclick="..">这样不行??
      

  3.   

    在tr上添加双击事件呗<table width="332" height="62" border="1" align="center">
        <tr class="th2" align="center">
            <td width="26"><img src="..\images\garrow.gif"></td>
            <td width="124">区分</td>
            <td width="160">总数</td>
        </tr>
        <s:iterator value="totalList">
            <tr id="要修改的记录标识" class="th1" align="center"
                onMouseOver="this.style.background='#AFC9E3'"
                onmouseout="this.style.background=''"
                ondblclick="modify(this.id)">
                <td><img src="..\images\garrow.gif"></td>
                <td>&nbsp;<s:property value="pc_type"></s:property></td>
                <td><s:property value="total_count"></s:property></td>
            </tr>
        </s:iterator>
    </table>
    <script>
    function modify(id){
        window.location = "你的修改页";
    }
    </script>
      

  4.   

    也可以写java代码内嵌写事件,不过还是用js好点