[英]JQuery is:focus not working in IE8
我用这个检查文本字段的焦点:
if ($('#title').is(":focus"))
<input type="text" id="title" value="Write your post..." />
每个其他浏览器都将其确定为 true,而 IE8 则不会。 这在IE8中有效吗?
无论 IE 在什么模式下运行,这都应该有效:
if(document.getElementById('title')==document.activeElement)
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.