Ò׽ؽØͼÈí¼þ¡¢µ¥Îļþ¡¢Ãâ°²×°¡¢´¿ÂÌÉ«¡¢½ö160KB

FlexÓëJavascript»¥ÏàͨÐÅ

FlexÓëJavascript»¥ÏàͨÐÅ¡£
ÔÚFlexÖÐÓÐÕâôһ¸öÀࣺExternalInterface.ÔÚÕâ¸öÀàÖÐËü¸øÎÒÃÇ£ºcallºÍaddCallback
FlexÖÐAsµ÷ÓÃJsµÄ·½·¨ÊÇ£º
     1¡¢µ¼Èë°ü £¨import flash.external.ExternalInterface;£©
     2¡¢Ê¹ÓÃExternalInterface.call("Jsº¯ÊýÃû³Æ",²ÎÊý)½øÐе÷Óã¬Æä·µ»ØµÄÖµ¾ÍÊÇJsº¯ÊýËù·µ»ØµÄÖµ
 
Jsµ÷ÓÃAsµÄ·½·¨ÊÇ£º
     1¡¢µ¼Èë°ü £¨import flash.external.ExternalInterface;£©
     2¡¢ÔÚinitAppÖÐʹÓÃExternalInterface.addCallback("ÓÃÓÚJsµ÷Óõĺ¯ÊýÃû",AsÖеĺ¯ÊýÃû)½øÐÐ×¢²áÏÂ
     3¡¢jsÖÐ ¾Í¿ÉÒÔÓÃdocument.getElementById("FlasÔÚHtmlÖеÄID").×¢²áʱÉèÖõĺ¯ÊýÃû£¨²ÎÊý£©½øÐе÷ÓÃ.


Ïà¹ØÎĵµ£º

flexʱÐòͼʾÀý

<?xml version="1.0" encoding="utf-8"?>
<!-- Simple example to demonstrate the DateTimeAxis class. -->
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml">
<mx:Script>

import mx.collections.ArrayCollection;
......

Flex ÓÒ¼ü²Ëµ¥

MXML:
<?xml version="1.0"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" fontSize="20" initialize="doinit()"   mouseOver="getMouseTarget(event)">
 <mx:ArrayCollection id="dgArray">
  <mx:Object pid="1" name="ÇØʼ»Ê" time="ÇØ" />
&nbs ......

javascript µÄ±Õ°ü

±Õ°ü£¨closure£©ÊÇJavascriptÓïÑÔµÄÒ»¸öÄѵ㣬ҲÊÇËüµÄÌØÉ«£¬ºÜ¶à¸ß¼¶Ó¦Óö¼ÒªÒÀ¿¿±Õ°üʵÏÖ¡£
ÏÂÃæ¾ÍÊÇÎÒµÄѧϰ±Ê¼Ç£¬¶ÔÓÚJavascript³õѧÕßÓ¦¸ÃÊǺÜÓÐÓõġ£
Ò»¡¢±äÁ¿µÄ×÷ÓÃÓò
ÒªÀí½â±Õ°ü£¬Ê×ÏȱØÐëÀí½âJavascriptÌØÊâµÄ±äÁ¿×÷ÓÃÓò¡£
±äÁ¿µÄ×÷ÓÃÓòÎ޷ǾÍÊÇÁ½ÖÖ£ºÈ«¾Ö±äÁ¿ºÍ¾Ö²¿±äÁ¿¡£
JavascriptÓïÑÔµÄÌØÊâÖ®´¦£¬¾ÍÔÚÓ ......

JavaScript CSS StyleÊôÐԲο¼

CSSÓï·¨ (²»Çø·Ö´óСд) ¡¡¡¡JavaScriptÓï·¨ (Çø·Ö´óСд)
border ¡¡¡¡border
border-bottom ¡¡¡¡borderBottom
border-bottom-color ¡¡¡¡borderBottomColor
border-bottom-style¡¡¡¡ borderBottomStyle
border-bottom-width ¡¡¡¡borderBottomWidth
border-color ¡¡¡¡borderColor
border-left ¡¡¡¡borderLeft ......

javascriptÖÐreplaceµÄÕýÔò±í´ïʽÓï·¨

replace
·½·¨
ÒÔÏÂÊÇjavascript
ÖеÄÀý×Ó
ÏÂÃæµÄʾÀýÑÝʾÁË replace
·½·¨½«µÚÒ»´Î³öÏֵĵ¥´Ê "The"
Ì滻Ϊµ¥´Ê "A"
µÄÓ÷¨¡£
function ReplaceDemo(){
   var r, re;                 & ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ