How can I deal with the following error I get when I use Dean Edwards' IE7.js with IE6?
I'm using Dean Edwards' IE7.js for IE6
<!--[if lt IE 7]>
<script src="http://ie7-js.g开发者_C百科ooglecode.com/svn/version/2.0(beta3)/IE7.js"
type="text/javascript"></script>
<![endif]-->
and getting a JavaScript error on IE 6 when it reads the line:
c.runtimeStyle[h]=c.parentElement.currentStyle[h]
How can I solve this?
I don't believe IE6 has a parentElement property. You might be able to get around this by including this code in the <!--[if lt ie7]>
tag:
Element.prototype.parentElement = Element.prototype.parentNode;
精彩评论