功能整理

视频全屏:allowFullScreen="true"

eg: <iframe src="" allowFullScreen="true" width="1024" height="768"></iframe>

取消视频全屏:document.webkitCancelFullScreen();

获取iframe中页面的元素:

var parentWin = parent.document.getElementById("ID").contentWindow;
var video = parentWin.document.getElementsByTagName("video");

swf背景透明:wmode=transparent

eg: <embed src="demo.swf" width="1024" height="768" wmode=transparent type="" >

使用FancyBox:

function loadSyFancybox () {
  var settings = {
    'transitionIn': 'fade',
    'transitionOut': 'fade',
    'titlePosition': 'over',
    'cyclic': false,
    'titleFormat': function(title) {
    return '<span id="fancybox-title-over">' + title + '</span>';
    }
  }
  $("a[rel=syImg]").fancybox(settings);

  //鼠标移开自动关闭

  $("a[rel=syImg]").fancybox(settings).hover(function() {

    $(this).click();
    $("#fancybox-overlay").hover(function() {
    $("#fancybox-close").click();
    });
  });

}

原文地址:https://www.cnblogs.com/huliang56/p/5703662.html