I used to be very depressed when encountering this kind of problem. Why did MS develop such a stupid IE, so that these people have to follow it? Then I thought about it, and for the sake of safety, restrictions should be added. Otherwise, others can Feel free to change the content of your web page, etc. . .
Okay, let’s not talk about other nonsense, let’s take a look at the following:
Remember to refer to the domain name as the domain name, not WWW or other, for example: shagndu8.com but not www.shangdu8.com
1. Please add the following code to the parent web page:
1<SCRIPT LANGUAGE="VBScript">
2 document.domain = "shangdu8.com"
3</SCRIPT>
2. Please add the following code to the IFRAME webpage you want to apply (this page can be placed on any server, not the server of shagndu8.com, for example: http://www.cnblogs.com/ ;
1<SCRIPT LANGUAGE ="VBScript">
2 document.domain = "shangdu8.com"
3</SCRIPT>
In this way, IE was deceived and fooled, haha, he thought that under the same domain, IFRAME can make IFRAME adaptive height or assign values or other operations to the parent frame.
Note: Although this code is small, it can solve big problems. I have tested it. Please feel free to use it. If the IFRAME content you want to apply is on someone else's server, then you want to complete this operation. Haha, you need to change the web page content and add The above code will do.
If you have any questions during use, you can contact me
EMAIL:jzeb#163.com
QQ:4803234