To check whether a specific element has focus, it's simpler: var input_focused = document.activeElement === input && document.hasFocus();.
確定! 回上一頁