这段JS,如果想让它随分辨率不同而自动按比例调整宽度,该如何修改?我尝试过修改focus_width2=100%,失败。
也尝试过直接将代码中的focus_width2替换成100%,失败。// JavaScript Document
var focus_width2=728
 var focus_height2=150
 var text_height2=0
 var swf_height2 = focus_height2+text_height2
 
var pics2= "images/ADD1.jpg|images/ADD2.jpg|images/ADD3.jpg|images/ADD4.jpg";
 var links2="http://www.xfdc.com.cn/|http://www.xfdc.com.cn/|http://www.xfdc.com.cn/|http://www.xfdc.com.cn/";
 var texts="";
 document.write('<object ID="focus_flash" 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_width2 +'" height="'+ swf_height2 +'">');
 document.write('<param name="allowScriptAccess" value="sameDomain"><param name="movie" value="inc/pixviewer.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='+pics2+'&links='+links2+'&texts='+texts+'&borderwidth='+focus_width2+'&borderheight='+focus_height2+'&textheight='+text_height2+'">');
 document.write('<embed ID="focus_flash" src="inc/pixviewer.swf" wmode="opaque" FlashVars="pics='+pics2+'&links='+links2+'&texts='+texts+'&borderwidth='+focus_width2+'&borderheight='+focus_height2+'&textheight='+text_height2+'" menu="false" bgcolor="#E7E7E7" quality="high" width="'+ focus_width2 +'" height="'+ swf_height2 +'" allowScriptAccess="sameDomain" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer"/>');
 document.write('</object>');
//-->
望赐教