Javacript向表中特定列中的每个单元格添加onblur事件

问题描述 投票:0回答:1

创建表后,我正在尝试在HTML表的特定列中的每个单元格中添加onblur

  $('#tableid td:nth-child(4) input').blur(function() { 
        alert('123')
     });

但是,当细胞失去焦点时,什么也没有发生。

javascript events html-table onblur
1个回答
0
投票

您要查找.onblur()而不是.blur()吗?

https://www.w3schools.com/jsref/event_onblur.asp

© www.soinside.com 2019 - 2024. All rights reserved.