<iframe> should also be a form of a framework, unlike <frame>, where an IFRAME can be embedded in any part of a Web page.
Today encountered a problem: How to achieve a click on a button, the current page to add a new small window, display a picture information?
As shown in the following illustration:
Before clicking:
After clicking:
Analysis: To make the new small window does not affect the parent page, we use the technology of the IFRAME framework here.
<iframe> should also be a form of a framework, unlike <frame>, where an IFRAME can be embedded in any part of a Web page. 】
Implementation is the idea: (1) on the button to add a click of the event, after a click to add an iframe window, and will generate pictures of the address added to it.
Specific code to implement:
(1) Add the Click event to the button:
<input type= "Radio" name= "DynamicType" id= "Dianji" style= "padding:0" 10px 0 5px;margin-left:10px;margin-top:13px; " />
<p class= "Loadphoto" ></p>
$ ("#dianji"). Click (function () {
$ ("P.loadphoto"). Empty () ; Empty the contents of the original P label
$ ("P.loadphoto"). HTML ("<iframe width=520 height=400 name=\" touzizuhe\ "id=\" frameborder=0 src= "Generate the address of the picture" ></iframe>);//Add the jquery statement of the IFRAME
});
Note: here the development of the IFRAME, will automatically access to generate the image of the address, so that the production of the picture needs to meet.
About the operation of the IFRAME in jquery (click the button to add a window) to introduce so many people, I hope to help you!