[英]$(“:focus”) returns no element for <input type=“file” /> in Firefox
[英]tabindex and <input type=“file” /> different in Firefox and IE
渲染時:
<input type="file" />
你有一個盒子和一個按鈕,對嗎? (至少在Firefox和IE中。)
一方面,在Firefox中,您只能使用Tab鍵來(聚焦)按鈕,而在IE中,則可以使用Tab鍵來(聚焦)框和按鈕。
另一方面,我想讓IE像Firefox一樣運行,我的意思是,我需要擺脫框框焦點。 考慮用戶通過鍵盤導航。
(原因是因為<input type="file" />
不會可見。相反,帶有背景圖像的<div>
會偽裝成<input type="file" />
。)
如果要推遲到div,為什么不將OnFocus()事件附加到submit,然后在該函數內的div上調用focus()
事件函數:
$("#MySubmit").focus(function(){
$("#MyDiv").focus();
});
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.