簡體   English   中英

JQuery 是:焦點在 IE8 中不起作用

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

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM