2011年7月10日

IE中Can't move focus to the control because it is invisible, not enabled, or of a type 。。。的解决方案

摘要: 我们通过IHTMLDocument获取到一个元素之后进行focus,如果这个元素不可见时,会报出上面的这个错误,网上的例子很少在http://www.webdeveloper.com/forum/showthread.php?t=103574中给出了一个解决方案。这个只是一个民间的方案吧,IE官方好像米有办法来获取到一个element是否能够focus。if(element.style.visibility=="hidden" || element.style.display=="none" || element.disabled==true) { // 阅读全文

posted @ 2011-07-10 12:35 一颗麦粒 阅读(1096) 评论(0) 推荐(0) 编辑

导航