我使用下面的代码使用数据表填充数据。
我想编辑其中一个列上的数据,编辑后必须使用onblur事件验证该值。
我试着在td元素上调用onblur事件,但没有成功。
我们非常感谢您的帮助。

 <table id='abc' border="1">
        <thead>
                <tr>
                    <th>Part Number</th>
                    <th>Quantity</th>
                </tr>
        </thead>

            <tbody>
             <c:forEach items="${uploadData.partsList}" var="part">
                <tr>
                    <td><c:out value="${part.partNumber}" /></td>
                    <td class="editableColumn" style="background-color:white"><c:out      value="${part.quantity}"/>
</td>

                </tr>
            </c:forEach>
        </tbody>
   </table>

最佳答案

如果TD具有tabindex属性,Onblur将触发。

关于javascript - 表td上的onblur事件,我们在Stack Overflow上找到一个类似的问题:https://stackoverflow.com/questions/27843746/

10-12 00:35
查看更多