gpt4 book ai didi

javascript - 模糊事件 : get the element clicked from inside the blur event

转载 作者:行者123 更新时间:2023-11-28 03:28:54 26 4
gpt4 key购买 nike

是否可以从模糊事件中获取被点击的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/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com