2

Firefox + Firebugを使用して、エラーメッセージを停止しようとしています...

Error: Permission denied to access property 'toString'

そしてChromeで言う。

Unsafe JavaScript attempt to access frame with URL http://jsfiddle.net/PEaUD/ from frame with URL http://www.youtube.com/embed/zTFBJgnNgU4?rel=0&showinfo=0&autohide=1&controls=0. Domains, protocols and ports must match.

私はjQueryを次のように使用しています...

$("body").html('<iframe width="500" height="500" src="http://www.youtube.com/embed/zTFBJgnNgU4?rel=0&showinfo=0&autohide=1&controls=0" frameborder="0" allowfullscreen></iframe>');

デモ: http: //jsfiddle.net/PEaUD/

何が問題なの?

... https://stackoverflow.com/a/13101119/622813

PS:Firefoxでこのエラーが発生したとき、YouTubeビデオを再生できず、play-btnをクリックしたときにURLバーに何も入力/コピー/パス(キーボードで)できないため、質問します。

4

1 に答える 1

3

YouTubeプレーヤーAPIを使用して動画を読み込むと、特定のエラーは発生しません

https://developers.google.com/youtube/js_api_reference

これがお役に立てば幸いです。

于 2013-02-04T11:53:25.830 に答える