JS 在火狐浏览器上不显示

Liuya818 2011-09-06 04:38:25
<!--
var focus_width=950;
var focus_height=246;
var text_height=0;
var swf_height = focus_height+text_height;
var pics = '/UploadFile/Ad/Big/201183152718_745730.jpg|/UploadFile/Ad/Big/201193122962_462136.jpg|/UploadFile/Ad/Big/2011931229484_570764.jpg|';
var links = '#|#';
var texts = '';
document.write('<object ID="focus_flas" classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0" width="'+ focus_width +'" height="'+ swf_height +'">');
document.write('<param name="allowScriptAccess" value="sameDomain"><param name="movie" value="include/playswf.swf"><param name="quality" value="high"><param name="bgcolor" value="#FFFFFF">');
document.write('<param name="menu" value="false"><param name=wmode value="opaque">');
document.write('<param name="FlashVars" value="pics='+pics+'&links='+links+'&texts='+texts+'&borderwidth='+focus_width+'&borderheight='+focus_height+'&textheight='+text_height+'">');
document.write('<embed ID="focus_flash" src=include/playswf.swf" wmode="opaque" FlashVars="pics='+pics+'&links='+links+'&texts='+texts+'&borderwidth='+focus_width+'&borderheight='+focus_height+'&textheight='+text_height+'" menu="false" bgcolor="#C5C5C5" quality="high" width="'+ focus_width +'" height="'+ swf_height +'" allowScriptAccess="sameDomain" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" />');
document.write('</object>');
//-->
...全文
193 5 打赏 收藏 转发到动态 举报
写回复
用AI写文章
5 条回复
切换为时间正序
请发表友善的回复…
发表回复
孟子E章 2011-09-06
  • 打赏
  • 举报
回复
这样写就可以了
document.write('<object type="application/x-shockwave-flash" data="include/playswf.swf" width="' + focus_width + '" height="' + swf_height + '">');
document.write('<param name="movie" value="include/playswf.swf" />');
document.write('<param name="allowScriptAcess" value="sameDomain" />');
document.write('<param name="quality" value="best" />');
document.write('<param name="bgcolor" value="#E5ECF4" />');
document.write('<param name="scale" value="noScale" />');
document.write('<param name="menu" value="false">');
document.write('<param name="wmode" value="opaque" />');
document.write('<param name="FlashVars" value="playerMode=embedded&pics='+pics+'&links='+links+'&texts='+texts+'&borderwidth='+focus_width+'&borderheight='+focus_height+'&textheight='+text_height+'" />');
document.write('</object>');
a59663986 2011-09-06
  • 打赏
  • 举报
回复
很正常啊 火狐不兼容
MuBeiBei 2011-09-06
  • 打赏
  • 举报
回复
document.write('<embed ID="focus_flash" src="include/playswf.swf" wmode="opaque" FlashVars="pics='+pics+'&links='+links+'&texts='+texts+'&borderwidth='+focus_width+'&borderheight='+focus_height+'&textheight='+text_height+'" menu="false" bgcolor="#C5C5C5" quality="high" width="'+ focus_width +'" height="'+ swf_height +'" allowScriptAccess="sameDomain" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" />');


少了一个引号
BLUE_LG 2011-09-06
  • 打赏
  • 举报
回复
把所有的document.write换成document.body.innerHTML试试。。。。
dongdgh 2011-09-06
  • 打赏
  • 举报
回复
你可以判断浏览器,如果是火狐的话某写js就直接不加载不就行了!

87,990

社区成员

发帖
与我相关
我的任务
社区描述
Web 开发 JavaScript
社区管理员
  • JavaScript
  • 无·法
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧