-
-
Save robertsky123/5384994 to your computer and use it in GitHub Desktop.
获取iframe中的函数和元素
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
var iframe = document.getElementById("my-iframe"), | |
iframeDoc = ( iframe.contentWindow || iframe.contentDocument ).myfunction();//访问函数 | |
iframeDoc = ( iframe.contentWindow || iframe.contentDocument ).document;//访问dom结构 | |
console.log( iframeDoc ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment