Jquery 控制台显示未捕获的安全性错误

Jquery 控制台显示未捕获的安全性错误,jquery,http,https,Jquery,Http,Https,我不确定如何修复下面的错误。有人能帮我吗 Uncaught SecurityError:未能从“HTMLIFrameElement”读取“contentDocument”属性:阻止了具有原点的帧http://mysite.net“从访问具有原点的帧”https://www.youtube.com". 请求访问的帧具有“http”协议,被访问的帧具有“https”协议。协议必须匹配。您正试图从http网站中访问https url。HTTPS和HTTP是不同的协议,导致不匹配 我认为以下链接可能会

我不确定如何修复下面的错误。有人能帮我吗


Uncaught SecurityError:未能从“HTMLIFrameElement”读取“contentDocument”属性:阻止了具有原点的帧http://mysite.net“从访问具有原点的帧”https://www.youtube.com".  请求访问的帧具有“http”协议,被访问的帧具有“https”协议。协议必须匹配。

您正试图从http网站中访问https url。HTTPS和HTTP是不同的协议,导致不匹配

我认为以下链接可能会有所帮助:

或者,如果您只是尝试使用不同的协议访问自己的域,也可以尝试设置“访问控制允许源站”标头


尝试使用//而不是在iFrame URL地址源地址中使用http://或https://指定协议。它应该使用站点的协议。

我不确定在哪里必须将
top.frames
更改为
parent.frames
。你知道我在哪里可以改变这个吗?或者,你认为如果我只是将我的站点的其余部分切换到https,这个问题可以解决吗?“父”在iframe中是你调用iframe的框架。是的,如果你只是将整个站点切换到https,它就会解决
if you want to access frames in a iframe you can change top with 
parent.frames only for accessing frames in the iframe who execute javascript.
try to change top with parent.frames

return top.frames;

return parent.frames;

in google chrome it work for me i can access all my frames in my iframe.