每当文本字段集中在我的网站上时,我都会使用jQuery执行操作.只要我通过点击它手动聚焦文本字段,一切正常.
但是:我正在使用HTML5的自动聚焦功能,而jQuery没有检测到文本字段自动被聚焦.如何手动或自动聚焦文本字段,如何确保我的脚本执行操作?
现在,我正在使用……
$("input:text,input:password").focus(function() { });
…检测文本字段何时突出显示.