问题
I'm using Dean Edwards' IE7.js for IE6
<!--[if lt IE 7]>
<script src="http://ie7-js.googlecode.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?
回答1:
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;
来源:https://stackoverflow.com/questions/1774519/how-can-i-deal-with-the-following-error-i-get-when-i-use-dean-edwards-ie7-js-wi