<SCRIPT LANGUAGE="JavaScript"><!-- var focus_width=700; var focus_height=400; var text_height=0; var swf_height = focus_height+text_height; <% sql="select top 6 * from list where zhonglei='推荐' and weizhi='轮播' order by id desc" set rs=server.createobject("adodb.recordset") rs.open sql,conn,1,1 do while not rs.eof flashpics=flashpics & "|" & rs("picindex") flashlinks=flashlinks & "|" & rs("picindex") flashtexts=flashtexts & "|" & rs("mingcheng") rs.movenext loop rs.close set rs=nothing %> var pics='<%if flashpics<>"" then response.Write(mid(flashpics,2))%>'; var links='<%if flashlinks<>"" then response.Write(mid(flashlinks,2))%>'; var texts='<%if flashtexts<>"" then response.Write(mid(flashtexts,2))%>'; var fv="pics="+pics+"&links="+links+"&texts="+texts+"&borderwidth="+focus_width+"&borderheight="+focus_height+"&textheight="+text_height; document.write('<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=5,0,0,0" width="'+focus_width+'" height="'+swf_height+'">'); document.write('<param name="movie" value="flash/flash_switch.swf"> <param name="quality" value="high"><param name="allowScriptAccess" value="sameDomain"><param name="menu" value="false"><param name="bgcolor" value="#ffffff"><param name="wmode" value="opaque">'); document.write('<param name="flashvars" value="'+fv+'"></object>');//--></SCRIPT>
这段JS的轮播代码可以在IE中正常显示,在火狐浏览器中就不行。为什么呢?
å¨document.wiriteåºçobjectæ ç¾ä¸å ä¸ä¸ä¸ª<embed>çæ ç¾è¯è¯~
å³æ¹æå¦ä¸ä»£ç ï¼æ³¨æé»è²å ç²é¨åï¼ï¼
<SCRIPT LANGUAGE="JavaScript">
<!--
var focus_width=700;
var focus_height=400;
var text_height=0;
var swf_height = focus_height+text_height;
<%
sql="select top 6 * from list where zhonglei='æ¨è' and weizhi='è½®æ' order by id desc" set rs=server.createobject("adodb.recordset")
rs.open sql,conn,1,1
do while not rs.eof
flashpics=flashpics & "|" & rs("picindex")
flashlinks=flashlinks & "|" & rs("picindex")
flashtexts=flashtexts & "|" & rs("mingcheng")
rs.movenext
loop
rs.close
set rs=nothing
%>
var pics='<%if flashpics<>"" then response.Write(mid(flashpics,2))%>';
var links='<%
if flashlinks<>"" then response.Write(mid(flashlinks,2))
%>';
var texts='<%
if flashtexts<>"" then response.Write(mid(flashtexts,2))
%>';
var fv="pics="+pics+"&links="+links+"&texts="+texts+"&borderwidth="+focus_width+"&borderheight="+focus_height+"&textheight="+text_height;
document.write('<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=5,0,0,0" width="'+focus_width+'" height="'+swf_height+'">');
document.write('<param name="movie" value="flash/flash_switch.swf"> <param name="quality" value="high"><param name="allowScriptAccess" value="sameDomain"><param name="menu" value="false"><param name="bgcolor" value="#ffffff"><param name="wmode" value="opaque">');
document.write('<embed src="flash/flash_switch.swf" wmode="opaque" FlashVars="'+fv+'" menu="false" bgcolor="#dadada" quality="high" width="'+ focus_width +'" height="'+ swf_height +'" allowScriptAccess="sameDomain" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer"');
document.write('<param name="flashvars" value="'+fv+'"></object>');//
-->
</script>
网上有很多解决方法。下面知道里有人回了:
有什么问题继续交流!