一个页面有多个按钮,点击按钮的时候弹出div新的层并且在里面加载对应的Flash。。如果实现?
我测试的代码:<head><title>测试你妹</title><scripttype="text/javascript"src="swfobject.js"></scr...
我测试的代码:
<head>
<title>测试你妹</title>
<script type="text/javascript" src="swfobject.js"></script>
<script type="text/javascript">
swfobject.registerObject("myFlashContent", "9.0.0");
</script>
<style>
body {background:#ccc;}
</style>
</head>
<body onLoad="javascript:nimei();" >
<script LANGUAGE="JavaScript">
function nimei(){
var txt=document.createElement("div");
txt.innerHTML=flashcode();
document.body.appendChild(txt);
}
function flashcode(){
var flash_code;
flash_code = "<object classid=\"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000\" width=\"800\" height=\"600\" id=\"myFlashContent\">";
flash_code += "\n<param name=\"movie\" value=\"dingzihu.swf\">";
flash_code += "\n<!--[if !IE]>-->";
flash_code += "\n<object type=\"application/x-shockwave-flash\" data=\"dingzihu.swf\" width=\"800\" height=\"600\">";
flash_code += "\n<!--<![endif]-->";
flash_code += "\n<a href=\"http://www.adobe.com/go/getflashplayer\">";
flash_code += "\n<img src=\"http://www.adobe.com/images/shared/download_buttons/get_flash_player.gif\" alt=\"Get Adobe Flash player\" />";
flash_code += "\n</a>"
flash_code += "\n<!--[if !IE]>-->";
flash_code += "\n</object>"
flash_code += "\n<!--<![endif]-->";
flash_code += "\n</object>";
return flash_code;
}
</script>
</body>
无法正常加载flash 展开
<head>
<title>测试你妹</title>
<script type="text/javascript" src="swfobject.js"></script>
<script type="text/javascript">
swfobject.registerObject("myFlashContent", "9.0.0");
</script>
<style>
body {background:#ccc;}
</style>
</head>
<body onLoad="javascript:nimei();" >
<script LANGUAGE="JavaScript">
function nimei(){
var txt=document.createElement("div");
txt.innerHTML=flashcode();
document.body.appendChild(txt);
}
function flashcode(){
var flash_code;
flash_code = "<object classid=\"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000\" width=\"800\" height=\"600\" id=\"myFlashContent\">";
flash_code += "\n<param name=\"movie\" value=\"dingzihu.swf\">";
flash_code += "\n<!--[if !IE]>-->";
flash_code += "\n<object type=\"application/x-shockwave-flash\" data=\"dingzihu.swf\" width=\"800\" height=\"600\">";
flash_code += "\n<!--<![endif]-->";
flash_code += "\n<a href=\"http://www.adobe.com/go/getflashplayer\">";
flash_code += "\n<img src=\"http://www.adobe.com/images/shared/download_buttons/get_flash_player.gif\" alt=\"Get Adobe Flash player\" />";
flash_code += "\n</a>"
flash_code += "\n<!--[if !IE]>-->";
flash_code += "\n</object>"
flash_code += "\n<!--<![endif]-->";
flash_code += "\n</object>";
return flash_code;
}
</script>
</body>
无法正常加载flash 展开
1个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询