2011-03-18 80 views
1

所以我有兩個以下iFrame代碼:Facebook登錄和YouTube嵌入的iframe衝突

<iframe title="YouTube video player" class="youtube-player" type="text/html" src="some youtube url" allowfullscreen="" showinfo="0" frameborder="0" height="390" width="590"></iframe> 

<div id="fb-root"></div><script src="http://connect.facebook.net/en_US/all.js#appId=someid&xfbml=1"></script><fb:login-button show-faces="true" width="200" max-rows="1"></fb:login-button> 

其中當我檢查源,facebook的代碼更改

<div class=" fb_reset" id="fb-root"><div style="position: absolute; top: -10000px; height: 0pt; width: 0pt;"></div></div><script src="http://connect.facebook.net/en_US/all.js#appId=someid&amp;xfbml=1"></script><fb:login-button class=" fb_iframe_widget " show-faces="true" width="200" max-rows="1"><span><iframe src="http://www.facebook.com/plugins/login.php?api_key=somekey&amp;channel=http%3A%2F%2Fstatic.ak.fbcdn.net%2Fconnect%2Fxd_proxy.php%3Fversion%3D0%23cb%3Dfe61c41eeb9262%26origin%3Dhttp%253A%252F%252Flocalhost%252Ff231b08ff49befe%26relation%3Dparent.parent%26transport%3Dpostmessage&amp;locale=en_US&amp;max_rows=1&amp;sdk=joey&amp;session_key=2.erTTx_22d7lVclAChVw8dw__.3600.1300428000-517177672&amp;show_faces=true&amp;width=200" class="fb_ltr" style="border: medium none; overflow: hidden; height: 94px; width: 200px;" name="f216f1832512134" id="f3c59d11d032c" scrolling="no"></iframe></span></fb:login-button> 

在同一頁...

由於某種原因,Facebook登錄應該出現的iframe最終包含了youtube視頻,因此兩個iframe最終都包含youtube視頻....

我該如何解決這個問題?

回答