javascript_to_flash.html

来自「javascript和flash的通信」· HTML 代码 · 共 33 行

HTML
33
字号
<HTML>
<HEAD>
<TITLE>javascript_to_flash</TITLE>
</HEAD>
<SCRIPT LANGUAGE=JavaScript>
<!--
function doPassVar(args){
	var sendText = args.value;
	window.document.myFlash.SetVariable("myVar", sendText);
}
//-->
</SCRIPT> 
<BODY bgcolor="#FFFFFF">
<p><b><font face="Geneva, Arial, Helvetica">Example of JavaScript-to-Flash communication</font></b> 
</p>
<p><font face="Geneva, Arial, Helvetica">Enter some text in the HTML form field 
  below and then click outside the field, or hit the Tab key, to send the text 
  to the Flash movie below:</font></p>
<form name="form1" onSubmit="doPassVar(sendText);" action="#">
  <input type="text" name="sendText" maxlength="45" onChange="doPassVar(this);">
</form>
<p><object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"
 codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=5,0,0,0"
 width=400 height=180 id="myFlash">
    <param name=movie value="javascript_to_flash.swf">
    <param name=quality value=high>

    <embed src="javascript_to_flash.swf" quality=high width=400 height=180 type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash" name="myFlash" swLiveConnect="true">
    </embed> 
  </object></p>
</BODY>
</HTML>

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?