IE7 找不到元素
最近碰到问题,使用IE7浏览一下网站左下角出现“找不到元素”的错误。开始我以为是网站的原因,但后来发现是机器的问题,那样只能是浏览器了~~~
重置IE7,没用,照样报错。
还好在google上找到解决方案,原文为英语,我大致翻译一下解决办法:
IE7 在浏览GWT程序时报“找不到元素”的错误
GWT网页程序在IE7中开始报“找不到元素”的错误,但这些网页应用程序在IE6和FireFox 2中都是用的好好的,难道IE7不再支持GWT,是真的吗?
然而其他机器的IE7浏览器用的好好的,没有出现上述的错误,情况就变得复杂了,你有没有碰到这个问题,下面是解决方案:
1、打开注册表编辑器,在运行里输入 regedit
2、找到这个位置:HKEY_CLASSES_ROOT\TypeLib\{EAB22AC0-30C1-11CF-A7EB-0000C05BAE0B}\1.1\0\win32
(八六九五提示:先找到TypeLib,然后再右键查找{EAB22AC0-30C1-11CF-A7EB-0000C05BAE0B},否则很麻烦~~~)
3、打开Default键值,该值是“C:\WINDOWS\system32\shdocvw.dll”(不包含双引号),这就是导致“找不到元素”的罪魁祸首了。
4、把上述的值改为“C:\WINDOWS\system32\ieframe.dll”(不包含双引号)
5、关闭IE7所有窗口,再重新打开,一切OK。
以下为英文原版文章(估计没几个人想看):
GWT not working on Internet explorer 7 (IE7) giving “Element not found” javascript error
GWT web application started to give “Element not found” javascript error message on Internet Explorer 7 (IE7)? This application worked fine on Internet Explorer 6 and Firefox 2. Now your best guess would be; GWT not working on IE 7 properly. Wasn’t it?
But the scenario became confusing and unbelievable because your application worked fine on IE7 in some machines while not on some others. Have you faced this issue? Then the below solution is for you.
This issue can be fixed by a making a change on windows registry.
Steps to follow are;
1. Open up the Registry editor – type regedit on command prompt.
2. Look for the key shown below
HKEY_CLASSES_ROOT\TypeLib\{EAB22AC0-30C1-11CF-A7EB-0000C05BAE0B}\1.1\0\win32
3. Click on the “Default” row and see the value there. If it’s value is “C:\WINDOWS\system32\shdocvw.dll”, then that is what causes the above mentioned issue. If you have installed Windows in a different drive; C:\ must be replaced with the that letter.
4. Replace that value with “C:\WINDOWS\system32\ieframe.dll”.
5. Now restart IE7, and load your GWT application.

感谢