- 作者:xiaoxiao
- 发表时间:2020-12-23 10:56
- 来源:未知
<script> function runCode() //定义一个运行代码的函数, { var code=event.srcElement.parentElement.children[0].value;//即要运行的代码。 var newwin=window.open('','',''); //打开一个窗口并赋给变量newwin。 newwin.opener = null // 防止代码对论谈页面修改 newwin.document.write(code); //向这个打开的窗口中写入代码code,这样就实现了运行代 码功能。 newwin.document.close(); } </script> <script> var flag=0; function play() { switch(flag){ case 0: flag=1; video.style.display="none"; reSize(10); break; case 1,3: return; break; case 2: flag=3; video.style.display="none"; reSize(-10); } } function reSize(dy) { panel.style.posHeight+=dy; if((panel.style.posHeight<300&&dy>0)||(panel.style.posHeight>100&&dy<0)) window.setTimeout("reSize(" + dy + ")",100); else { video.style.display=""; if(dy>0) {swf.height=300;flag=2;cmdPlay.innerText='关闭';} if(dy<0) {swf.height=85;flag=0;cmdPlay.innerText='重放';} } } </script> <table width=778 border=0 align=center> <tr> <td> <div style="background-color:black;width:778px;height:100px;" id="panel"> <div id="video"> <object id="swf" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version =5,0,0,0" width="778" height="85"> <param name=movie value="http://adimages.sina.com.hk/BBTV2_0804_espn2_sina760x90.swf?clickTAG=http://oa scentral.sina.com.hk/RealMedia/ads/click_lx.ads/hk.sina.com/clickscommand/1234/Bottom 1/Sina.com/HK_BBTV_0704_HP_Curtain/textlink.gif/1"> <param name=quality value=high> <embed src="http://adimages.sina.com.hk/BBTV2_0804_espn2_sina760x90.swf?clickTAG=http://oasc entral.sina.com.hk/RealMedia/ads/click_lx.ads/hk.sina.com/clickscommand/1234/Bottom1/ Sina.com/HK_BBTV_0704_HP_Curtain/textlink.gif/1" quality=high pluginspage="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=S hockwaveFlash" type="application/x-shockwave-flash" width="85" height="85"> </embed> </object> </div> <br> </div> <div style="text-align:center;background-color:black"> <a href="javascript:void(null)" rel="nofollow" οnclick="javascript:play()" id="cmdPlay" style="color:yellow">播放</a> </div> </td> </tr> </table> [Ctrl+A 全部选择 提示:你可先修改部分代码,再按运行]