Home > front end >  Error: always read the property 'contentWindow of undefined
Error: always read the property 'contentWindow of undefined

Time:10-11

This was the first time encapsulates a JS file, use or normal?? Off again with an error, please the great god teach
The function initVideoNotPlay (frame, IP, port, user, PSW, channel)
{
//var window=$(" # "+ frame) [0]. ContentWindow
//the console. The log ($(" # "+ frame) [0]).
$(" # "+ frame) [0]. ContentWindow. InitVideo (' divPlugin, IP, port, user, PSW, '0', 280190, 2, channel);//error position
$(" # "+ frame) [0]. ContentWindow. ClickGetLocalCfg ();
$(" # "+ frame) [0]. ContentWindow. ClickSetLocalCfg ();

}

CodePudding user response:

Look have cross domain

CodePudding user response:

Across the iframe belongs to cross domain??

- & gt; TVideo1 "SRC=" https://bbs.csdn.net/topics/nineVideo.html "frameborder=" 0 "width=" 400 "height=" 160 "scrolling=" No "& gt; </iframe>

Here id is upstairs frame, novice to teach, thank you

CodePudding user response:

Draw the iframe window object is? Take the window object can
 
<iframeName TVideo1 iframe id="" name=" "SRC=" https://bbs.csdn.net/topics/nineVideo.html "frameborder=" 0 "width=" 400 "height=" 160 "scrolling=" No "& gt; </iframe>
<script>
The console. The log (Windows. Frames. IframeName)
</script>

  • Related