Home >Web Front-end >JS Tutorial >When window.parent calls the parent frame, IE is incompatible with Firefox_javascript skills

When window.parent calls the parent frame, IE is incompatible with Firefox_javascript skills

WBOY
WBOYOriginal
2016-05-16 18:49:021233browse

Original code: (normal in IE, window.parent step is not run in Firefox at all)

Copy code The code is as follows:

<script> <br>function oa_tool1(){ <br>window.parent.mm.rows="20,200,10,*"; <br>} <br></script&gt ; <br> </div> <br>Modify the code: (normal in IE and Firefox) <br><div class="codetitle"> <span><a style="CURSOR: pointer" data="38263" class="copybut" id="copybut38263" onclick="doCopy('code38263')"><u>Copy the code</u></a></span> The code is as follows :</div> <div class="codebody" id="code38263"> <br><script> <br>function oa_tool1(){ <br>window.parent.document.getElementById("mm").rows="20,200,10,*"; <br>} <br></script>

Reason:
In principle, the modified code is correct code, and the original code is an error code, just because ie The fault tolerance is strong, so there will be no mistakes.
Prevention:
When we write code, we must try our best to standardize the code.
Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn