07-10
07
利用JS解决Flash有边框问题
作者:Java伴侣 日期:2007-10-07
以下是百度页面上的解决方案
htm页面:
JS:
htm页面:
复制内容到剪贴板 程序代码
<SCRIPT>if (typeof(cf)=="function") {cf("http://eiv.baidu.com/maimg/20070929/104162027.swf","100%","90","http://ma.baidu.com/ma/rcv/click.php?t=uv-b5HDhTv-b5HDdrjbYFMIGujYkFhVGujYkFhqsULnqniuhUWdAULFdUiudThsqpZwYTaR1fiRzwBRzwh7bQhwEIyF_uyP_pyPoQh4-IaRzwhP_pzR1fWD1PjDsnWnzPiR1fWcsnjR4nHTkFHPaUaR1wh9YIZ0-nYD-nbm-nbuLILT8mgFWpgw-mz4spA-_pgK1QhPEUiRzwhP8FHFAXh6-nbmhpvN45HckPHu-PHIBrywWnWFhmhf1uAwBm1NhuW0vnHFBmyfkFMP85Hm4FMnqnyNbryFBPhnsPj-hrHn1nBuzTAq15HDhuZfqUb9DPA4cNAVfp-wvThm","0");}</SCRIPT>
<SCRIPT src="XX.files/ff.js"></SCRIPT>
<SCRIPT src="XX.files/ff.js"></SCRIPT>
JS:
复制内容到剪贴板 程序代码
function cf(flashsrc,flashwidth,flashheight,flashlink,br){
document.write("<table width="+flashwidth+" height="+flashheight+" border=0 cellpadding=0 cellspacing=0><tr><td>");
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=\"position:relative;filter:alpha(opacity=0);-moz-opacity:0;z-index:10;left:0;top:0;background:transparent !important;background:#cdeaf6;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></tr></table>");
if (br=="1") {
document.write("<br>");
}
}
function cf1(flashsrc,flashwidth,flashheight,br){
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></embed>");
if (br=="1") {
document.write("<br><br>");
}
}
document.write("<table width="+flashwidth+" height="+flashheight+" border=0 cellpadding=0 cellspacing=0><tr><td>");
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=\"position:relative;filter:alpha(opacity=0);-moz-opacity:0;z-index:10;left:0;top:0;background:transparent !important;background:#cdeaf6;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></tr></table>");
if (br=="1") {
document.write("<br>");
}
}
function cf1(flashsrc,flashwidth,flashheight,br){
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></embed>");
if (br=="1") {
document.write("<br><br>");
}
}
评论: 0 | 引用: 0 | 查看次数: 651
发表评论