html给Flash加链接的代码
作者:winxml 日期:2009-08-11
把以下代码另存为html页 打开试下效果``
程序代码
fh.js内容:
程序代码
程序代码<script src="http://eiv.baidu.com/other/fh.js"></script>
<script>if (typeof(cf_h)=="function") {cf_h("http://eiv.baidu.com/hyimg/20090803/46069100212.swf","760","90","http://www.wenmc.com","0");}</script>
<script>if (typeof(cf_h)=="function") {cf_h("http://eiv.baidu.com/hyimg/20090803/46069100212.swf","760","90","http://www.wenmc.com","0");}</script>
fh.js内容:
程序代码 function cf_h(flashsrc,flashwidth,flashheight,flashlink,br){
if (flashwidth != "100%")
{
var tbWidth = parseInt(flashwidth)+28 + 6;
}
else
{
var tbWidth =flashwidth;
}
document.write("<table width="+tbWidth+" height="+flashheight+" border=0 cellpadding=0 cellspacing=0>");
document.write("<tr><td style=\"border:3px solid #BFBFBF;\">");
document.write("<div style=\"position:relative\">");
document.write("<embed style=\"position:absolute;z-index:0\" src="+flashsrc+" quality=\"high\" width="+flashwidth+" height="+flashheight+" TYPE=\"application/x-shockwave-flash\" PLUGINSPAGE=\"http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash\" wmode=\"opaque\"></embed>");
document.write("<div style=\"background:white;filter:alpha(opacity=0);opacity:0;position: relative;z-index:10;left:0pt;top:0pt;width:"+flashwidth+";height:"+flashheight+"px;\">");
document.write("<a href="+flashlink+" target=\"_blank\" style=\"cursor:pointer;display:block;width:"+flashwidth+";height:"+flashheight+"px;\"></a>");
document.write("</div>");
document.write("</div>");
document.write("</td><td style=\"background:url(http://eiv.baidu.com/mapm2/rt.gif) no-repeat left top;width:28px;\"></td></tr></table>");
if (br=="1") {
document.write("<br>");
}
}
function cf1_h(flashsrc,flashwidth,flashheight,br){
if (flashwidth != "100%")
{
var tbWidth = parseInt(flashwidth)+28 + 6;
}
else
{
var tbWidth =flashwidth;
}
document.write("<table width="+tbWidth+" height="+flashheight+" border=0 cellpadding=0 cellspacing=0>");
document.write("<tr><td style=\"border:3px solid #BFBFBF;\">");
document.write("<embed src=\""+flashsrc+"\" quality=high pluginspage=\"http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash\" type=\"application/x-shockwave-flash\" width="+flashwidth+" height="+flashheight+" align=center wmode=\"opaque\"></embed>");
document.write("</td><td style=\"background:url(http://eiv.baidu.com/mapm2/rt.gif) no-repeat left top;width:28px;\"></td></tr></table>");
if (br=="1") {
document.write("<br>");
}
}
if (flashwidth != "100%")
{
var tbWidth = parseInt(flashwidth)+28 + 6;
}
else
{
var tbWidth =flashwidth;
}
document.write("<table width="+tbWidth+" height="+flashheight+" border=0 cellpadding=0 cellspacing=0>");
document.write("<tr><td style=\"border:3px solid #BFBFBF;\">");
document.write("<div style=\"position:relative\">");
document.write("<embed style=\"position:absolute;z-index:0\" src="+flashsrc+" quality=\"high\" width="+flashwidth+" height="+flashheight+" TYPE=\"application/x-shockwave-flash\" PLUGINSPAGE=\"http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash\" wmode=\"opaque\"></embed>");
document.write("<div style=\"background:white;filter:alpha(opacity=0);opacity:0;position: relative;z-index:10;left:0pt;top:0pt;width:"+flashwidth+";height:"+flashheight+"px;\">");
document.write("<a href="+flashlink+" target=\"_blank\" style=\"cursor:pointer;display:block;width:"+flashwidth+";height:"+flashheight+"px;\"></a>");
document.write("</div>");
document.write("</div>");
document.write("</td><td style=\"background:url(http://eiv.baidu.com/mapm2/rt.gif) no-repeat left top;width:28px;\"></td></tr></table>");
if (br=="1") {
document.write("<br>");
}
}
function cf1_h(flashsrc,flashwidth,flashheight,br){
if (flashwidth != "100%")
{
var tbWidth = parseInt(flashwidth)+28 + 6;
}
else
{
var tbWidth =flashwidth;
}
document.write("<table width="+tbWidth+" height="+flashheight+" border=0 cellpadding=0 cellspacing=0>");
document.write("<tr><td style=\"border:3px solid #BFBFBF;\">");
document.write("<embed src=\""+flashsrc+"\" quality=high pluginspage=\"http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash\" type=\"application/x-shockwave-flash\" width="+flashwidth+" height="+flashheight+" align=center wmode=\"opaque\"></embed>");
document.write("</td><td style=\"background:url(http://eiv.baidu.com/mapm2/rt.gif) no-repeat left top;width:28px;\"></td></tr></table>");
if (br=="1") {
document.write("<br>");
}
}
评论: 0 | 引用: 0 | 查看次数: -
发表评论
上一篇
下一篇

文章来自:
Tags: