日期:2014-05-16 浏览次数:20340 次
$(function(){ $.ajaxSetup({ async: false }); var url="/img.do?method=listone"; $.post(url,function(data){ flash("flashbox",data); }); }); function flash(id,path){ var box=document.getElementById(id); linkarr = new Array(); picarr = new Array(); textarr = new Array(); var swf_width=764; var swf_height=201; var files=path; var links = ""; var texts = ""; for(i=1;i<picarr.length;i++){ if(files=="") files = picarr[i]; else files += "|"+picarr[i]; } for(i=1;i<linkarr.length;i++){ if(links=="") links = linkarr[i]; else links += "|"+linkarr[i]; } for(i=1;i<textarr.length;i++){ if(texts=="") texts = textarr[i]; else texts += "|"+textarr[i]; } box.innerHTML+="<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=\'"+ swf_width +"\' height=\'"+ swf_height +"\'>"; box.innerHTML+="<param name=\'movie\' value=\'js/indexpic.swf\'><param name=\'quality\' value=\'high\'>"; box.innerHTML+="<param name=\'menu\' value=\'false\'><param name=wmode value=\'opaque\'>"; box.innerHTML+="<param name=\'FlashVars\' value=\'bcastr_file="+files+"&bcastr_link="+links+"&bcastr_title="+texts+"\'>"; box.innerHTML+="<embed src=\'js/indexpic.swf\' wmode=\'opaque\' FlashVars=\'bcastr_file="+files+"&menu=\'false\' quality=\'high\' width=\'"+ swf_width +"\' height=\'"+ swf_height +"\' type=\'application/x-shockwave-flash\' pluginspage=\'http://www.macromedia.com/go/getflashplayer\' />"; box.innerHTML+="</object>"; alert(box.innerHTML); }