【 tulaoshi.com - Web开发 】
在页面最下面放上如下的代码就可以了
代码如下:
script
function flashrun()
{
var d=document.getElementsByTagName("object")
for(x=0;xd.length;x++)
{
var a=String(d[x].classid)
if(a!="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000")continue
var aw=d[x].width
var ah=d[x].height
var sr=""
var d1=d[x].getElementsByTagName("param")
for(xx=0;xxd1.length;xx++)
{
if(d1[xx].name=="move")sr=d1[x].value
}
if(sr!="")
var t='OBJECT classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,0,0" WIDTH='+aw+' HEIGHT='+ah+''
+'PARAM NAME=movie VALUE="'+sr+'"'
+'PARAM NAME=wmode VALUE=transparent'
+'PARAM NAME=loop VALUE=true'
+'PARAM NAME=quality VALUE=high'
+'EMBED src="'+sr+'" loop=true wmode=opaque quality=high swLiveConnect=FALSE WIDTH='+aw+' HEIGHT='+ah+' TYPE="application/x-shockwave-flash" PLUGINSPAGE="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash"/EMBED'
+'/OBJECT'
d[x].outerHTML=t
}
}
/script