from jquery to page variables
Please forgive my poor use of the correct terminology here!
I have a page with nested iframe where I use jquery to traverse through to it - I can pull any element from the iframe and perform jquery functions on it.
Within 开发者_JS百科the iframe's page, is a javascript variable. How can I access this variable?
cheers :)
If your iframes are hosted on the same domain you can access them from the window.frames array. Something so:
window.frames['myframename'].document.some_variable
See: Invoking JavaScript code in an iframe from the parent page
精彩评论