JavaScript] 大幅一次性图片图片效果JS代码

<script>
<!--
//////////////////////////////////////////////////////////////////
// 大幅一次性图片   //
//(请将JS嵌入<body>下面,即页面最顶层)  //
// 第 40 行开始加入自定义内容  //
//2006.02.09 V1.00 By Clear for PPLive.com  //
//////////////////////////////////////////////////////////////////
function imgBigmap(boolFull,strImg,strURL,intTime,adURL,intWidth,intHeight,strBak){
 if(boolFull == "y"){
  intWidth=document.documentElement.clientWidth
  intHeight=document.documentElement.clientHeight
  if(strImg == "flash"){
   document.write("<object id=\"map\" classid=\"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000\" codebase=\"
http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,19,0\" width=\""+intWidth+"\" height=\""+intHeight+"\">")
   document.write("<param name=\"movie\" value=\""+strURL+"\" />")
   document.write("<param name=\"quality\" value=\"high\" />")
   document.write("<embed src=\""+strURL+"\" quality=\"high\" pluginspage=\"
http://www.macromedia.com/go/getflashplayer\" type=\"application/x-shockwave-flash\" width=\""+intWidth+"\" height=\""+intHeight+"\"></embed>")
   document.write("</object>")
  }else{
   document.write("<img id=\"map\" onclick=\"window.open('"+adURL+"')\" src=\""+strURL+"\" width=\""+intWidth+"\" height=\""+intHeight+"\" alt=\""+strBak+"\" border=\"0\" />")
  }
 }else{
  if(strImg == "flash"){
   document.write("<div id=\"map\" style=\""+intWidth+"px; height:"+intHeight+"; margin-left:auto; margin-right:auto\">")
   document.write("<object classid=\"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000\" codebase=\"
http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,19,0\" width=\""+intWidth+"\" height=\""+intHeight+"\">")
   document.write("<param name=\"movie\" value=\""+strURL+"\" />")
   document.write("<param name=\"quality\" value=\"high\" />")
   document.write("<embed src=\""+strURL+"\" quality=\"high\" pluginspage=\"
http://www.macromedia.com/go/getflashplayer\" type=\"application/x-shockwave-flash\" width=\""+intWidth+"\" height=\""+intHeight+"\"></embed>")
   document.write("</object>")
   document.write("</div>")
  }else{
   document.write("<div id=\"map\" style=\""+intWidth+"px; height:"+intHeight+"; margin-left:auto; margin-right:auto\">")
   document.write("<img src=\""+strURL+"\" onclick=\"window.open('"+adURL+"')\" width=\""+intWidth+"\" height=\""+intHeight+"\" alt=\""+strBak+"\" border=\"0\" />")
   document.write("</div>")
  }
 }
 setTimeout("imgClose()",intTime)
}
function imgClose(){
 document.getElementById("map").style.display = "none"
}
imgBigmap("n","img","
http://www.alixixi.com/alixixi.gif",5000,"http://www.alixixi.com",772,600,"图片调用出错");

//使用方法:
//imgBigmap(boolFull,strImg,strURL,intTime,adURL,intWidth,intHeight,strBak)
//
//boolFull 定义是否全屏显示
//     全屏显示:"y"(选择全屏后不用设置intWidth,intHeight)
//     不全屏:"n"
//strImg 定义广告类型
//    定义为Flash动画时:"flash"
//    定义为图片时:"img"
//strURL 定义文件路径:
//    绝对路径"
http://www.pplive.com/img.jpg"
//    相对路径"dd_38.swf"
//intTime 定义广告显示时间,单位:毫秒
//adURL 设置为图片时定义广告指向链接"
http://www.pplive.com"
//intWidth 定义广告宽度
//intHeight 定义广告高度
//strBak 当定义广告类型为图片时,图片调用出错处理
//    加入调用出错提示:"图片调用出错"
//-->

</Script>
这里是文本

原文地址:https://www.cnblogs.com/QDuck/p/421112.html