水下电动推进器视频:javascript的循环语句问题,如何循环?

来源:百度文库 编辑:查人人中国名人网 时间:2024/04/28 22:29:52
如何把12345做成自动的

<script type="text/javascript">

imgUrl1="admin/bigImg/1.jpg";
imgtext1="新闻标题1"
imgLink1=escape("http://www.123.com/");
imgUrl2="admin/bigImg/5.jpg";
imgtext2="新闻标题2"
imgLink2=escape("");
imgUrl3="admin/bigImg/2.jpg";
imgtext3="新闻标题3"
imgLink3=escape("");
imgUrl4="admin/bigImg/5.jpg";
imgtext4="新闻标题4"
imgLink4=escape("");

var focus_width=250
var focus_height=180
var text_height=0
var swf_height = focus_height+text_height

var pics=imgUrl1+"|"+imgUrl2+"|"+imgUrl3+"|"+imgUrl4
var links=imgLink1+"|"+imgLink2+"|"+imgLink3+"|"+imgLink4
var texts=imgtext1+"|"+imgtext2+"|"+imgtext3+"|"+imgtext4

document.write('<object 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="images/flash/mm_flash.swf"><param name="quality" value="high"><param name="bgcolor" value="#826A81">');
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 src="pixviewer.swf" wmode="opaque" FlashVars="pics='+pics+'&links='+links+'&texts='+texts+'&borderwidth='+focus_width+'&borderheight='+focus_height+'&textheight='+text_height+'" menu="false" bgcolor="#826A81" quality="high" width="'+ focus_width +'" height="'+ focus_height +'" allowScriptAccess="sameDomain" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" />'); document.write('</object>');

</script>

<% for i=1 to 5 %>

imgUrl1="admin/bigImg/<%=i%>.jpg";
imgtext<%=i%>.="新闻标题1"
imgLink<%=i%>.=escape("http://www.123.com/");

<% next %>