是否可以从模糊事件中获取被点击的dom元素。
myTxtBox.blur(function (e) {
var myTxtBoxClass = e.target.className
var getClassOfElementclicked == //get the class of clicked element
});
最佳答案
我认为你应该使用 .click(function(){});获取点击的对象。然后你可以将它设置为模糊。目前尚不清楚是什么首先引发了模糊事件。
如果您想查看当前正在“模糊”的哪个对象被点击,您可以在对象模糊时为其分配一个类,并将点击事件分配给该类。
关于javascript - 模糊事件 : get the element clicked from inside the blur event,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/19277147/