<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "<html xmlns="<head>
<meta. http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>打開與關(guān)閉FLASH</title>
<script. type="text/javascript" src="swfobject.js"></script>
</head>
<body>
<div id="flashcontent" ></div>
<button id="showBtn" nclick="showFlash()" >運行</button>
<input id="seeBtn" type="button" nclick="seeFlash()" value="隱藏" />
</body>
<script>
var so=new SWFObject("index.swf","flash","100%","100%","10");
var btn=document.getElementById("showBtn");
function showFlash(){
if(btn.innerHTML=="運行"){
so.write("flashcontent");
btn.innerHTML="關(guān)閉";
}else{
hideFlash();
}
}
function hideFlash(){
document.getElementById("flashcontent").innerHTML="";
btn.innerHTML="運行";
}
function seeFlash(){
var _div=document.getElementById("flashcontent");
var _btn=document.getElementById("seeBtn");
if(_div.style.display=="none"){
_div.style.display="";
_btn.value="隱藏";
}else{
_div.style.display="none";
_btn.value="顯示";
}
}
showFlash();
</script>
</html>
聯(lián)系客服