0
我正在使用iPad的以下代碼。但是,儘管在IE瀏覽器的錯誤信息「對象(不支持的addEventListener)」通過Internet Explorer中的錯誤
function isTextInput(node) {
return ['INPUT', 'TEXTAREA'].indexOf(node.nodeName) !== -1;
}
document.addEventListener('touchstart', function(e) {
if (!isTextInput(e.target) && isTextInput(document.activeElement)) {
//document.activeElement.blur();
$('input').blur();
}
}, false);
提示:__attachEvent__,http://www.javascripter.net/faq/addeventlistenerattachevent.htm – Satpal
謝謝Satpal。這是有幫助的\ –