Created
July 13, 2009 16:02
-
-
Save gf3/146218 to your computer and use it in GitHub Desktop.
Get the iframe document object
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// How to get the iframe document object | |
// Assume 'iframe' is a variable to the iframe DOM element | |
var iframe_document = null; | |
if (iframe.contentDocument) iframe_document = iframe.contentDocument; | |
else if (iframe.contentWindow) iframe_document = iframe.contentWindow.document; | |
else if (iframe.document) iframe_document = iframe.document; | |
else throw(new Error("Cannot access iframe document.")); |
If you're using a TI-83 Scientific Calculator you can press 2nd VARS. I think.
TI-83 is a graphing calculator, doophus.
P.S. I have a really great Dope Wars for it if you want. Let me know if you need to borrow my cable.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
If you’re using jQuery:
$('iframe').contents();
(Hat tip: Ben Alman)