免費論壇 繁體 | 簡體
Sclub交友聊天~加入聊天室當版主
分享
返回列表 發帖
这代码是从 besv.net 网站转来的,你试试看应该能用。
  1. <iframe width="560" height="315" style="max-width:90%;" src="https://www.facebook.com/plugins/video.php" allowfullscreen id="fb_{1}"></iframe>
  2. <script type="text/javascript">
  3. document.getElementById("fb_{1}").src='https://www.facebook.com/plugins/video.php?href='+encodeURIComponent("{1}")+'&width=560&show_text=false&height=315';
  4. </script>
複製代碼

TOP

本帖最後由 無名. 於 2018-3-15 18:35 編輯

回復 5# wnjun1

这个是youtube的,也是转自 besv。net
  1. <iframe width="560" height="315" style="max-width:90%;" src="https://www.youtube.com/embed/" frameborder="0" allowfullscreen id="yt_{1}"></iframe>
  2. <script type="text/javascript">
  3. var Youtube = "{1}";if(Youtube.search("youtu.be") > -1 ){var URL = Youtube.split("be/")[1].split("?")[0];}else if(Youtube.search("youtube.com") > -1 ){var URL = Youtube.split("v=")[1].split("&")[0];}else{var URL = Youtube;}document.getElementById("yt_{1}").src='https://www.youtube.com/embed/'+URL;
  4. </script>
複製代碼

TOP

返回列表