07-10
07

利用JS解决Flash有边框问题

以下是百度页面上的解决方案
htm页面:


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>");
    }
}


文章来自: 本站原创
引用通告: 查看所有引用 | 我要引用此文章
Tags:
相关日志:
评论: 0 | 引用: 0 | 查看次数: 620
发表评论
昵 称:
密 码: 游客发言不需要密码.
内 容:
验证码: 验证码
选 项:
虽然发表评论不用注册,但是为了保护您的发言权,建议您注册帐号.
字数限制 1000 字 | UBB代码 开启 | [img]标签 关闭