JS obtains and operates the element methods in iframe. For details about how to obtain and set the object elements and documents in iframe in JS, see.
1. Dedicated to IE (Image Positioning through frames index ):
The Code is as follows:
Document.framespolici}.doc ument. getElementById ('element id ');
2. Dedicated to IE (Image Positioning through iframe ):
The Code is as follows:
Document.frames{'iframe's name'}.doc ument. getElementById ('element id ');
The above method is not only applicable to iframe, but also to frame in frameset. Although IE is good at customizing standards, I have to say that many of its designs are more humane. For example, it also supports the following standard paths and provides a simple and visualized writing method.
3. Common Methods:
The Code is as follows:
Document.getelementbyid('iframe's id'{.content}doc ument. getElementById ('element id ')
Note that contentWindow is often ignored because it represents the window objects inside the frame and iframe.
JS get iframe document content
The Code is as follows: