How can I work with jQuery and iframe. Get and pass var from iframe to body and from body to iframe. I have the following example. How can I click the button in iframe and make it take effect on the the body#test. How about ready var x in iframe.
var x = "whatever";
Inside page.html i have
回答1:
$("#myid", top.document);
or
$("#myid", parent.document.body);
This will give you access to the container of the IFRAME