[英]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.