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

flashÓëjavascriptµÄ½»»¥


flashÓëjavascriptµÄ½»»¥¿ÉÄÜÌÖÂ۵ıȽ϶à,½ñÌìΪ´ó¼Ò½éÉÜÏÂÈçºÎʹÓÃflexÓëjavascript½øÐн»»¥
Ò»¡¢ÔÚJavaScriptÖе÷ÓÃFlex·½·¨
ÔÚFlexÖпÉÒÔÓÃExternalInterfaceÀ´µ÷ÓÃFlexµÄ·½·¨£¬Í¾¾¶ÊÇ
1.ͨ¹ýÔÚFlexÓ¦Óÿɵ÷Ó÷½·¨ÁбíÖÐÌí¼ÓÖ¸¶¨µÄ¹«Ó÷½·¨¡£ÔÚFlexÓ¦ÓÃÖÐͨ¹ýµ÷ÓÃaddCallback()¿ÉÒÔ°ÑÒ»¸ö·½·¨Ìí¼Óµ½´ËÁбíÖС£addCallback½«Ò»¸öActionScriptµÄ·½·¨×¢²áΪһ¸öJavaScriptºÍVBScript¿ÉÒÔµ÷Óõķ½·¨¡£
addCallback()º¯ÊýµÄ¶¨ÒåÈçÏ£º
addCallback(function_name:String, closure:Function):void
function_name²ÎÊý¾ÍÊÇÔÚHtmlÒ³ÃæÖнű¾µ÷Óõķ½·¨Ãû¡£closure²ÎÊýÊÇÒªµ÷Óõı¾µØ·½·¨£¬Õâ¸ö²ÎÊý¿ÉÒÔÊÇÒ»¸ö·½·¨Ò²¿ÉÒÔÊǶÔÏóʵÀý¡£
¾Ù¸öÀý×Ó£º
<mx:Script>
    import flash.external.*;
    public function myFunc():Number {
        return 42;
    }
    public function initApp():void {
        ExternalInterface.addCallback("myFlexFunction",myFunc);
    }
</mx:Script>
2.ÄÇôÔÚHtmlÒ³ÃæÖУ¬ÏÈ»ñµÃSWF¶ÔÏóµÄÒýÓã¬Ò²¾ÍÊÇÓÃ<object .../>ÉùÃ÷µÄSwfµÄIdÊôÐÔ£¬±ÈÈç˵ÊÇMyFlexApp¡£È»ºó¾Í¿ÉÒÔÓÃÒÔÏ·½Ê½µ÷ÓÃFlexÖеķ½·¨¡£
<SCRIPT language='JavaScript' charset='utf-8'>
    function callApp() {
        var x = MyFlexApp.myFlexFunction();
        alert(x);
    }
</SCRIPT>
<button onclick="callApp()">Call App</button>
¶þ¡¢ÔÚFlexÖе÷Óà JavaScript
Äã¿ÉÒÔµ÷ÓÃHtmlÒ³ÃæÖеÄJavaScript£¬Í¨¹ýÓëJavaScriptµÄ½»»¥£¬¿ÉÒԸıäStyle£¬µ÷ÓÃÔ¶³Ì·½·¨¡£»¹¿ÉÒÔ½«Êý¾Ý´«µÝ¸øHtmlÒ³Ã棬´¦ÀíºóÔÙ·µ»Ø¸øFlex£¬Íê³ÉÕâÑùµÄ¹¦ÄÜÖ÷ÒªÓÐÁ½ÖÖ·½·¨£ºExternalInterface()ºÍnavigateToUrl()¡£
ÔÚFlexÖе÷ÓÃJavaScript×î¼òµ¥µÄ·½·¨ÊÇʹÓÃExternalInterface()£¬¿ÉÒÔʹÓôËAPIµ÷ÓÃÈÎÒâJavaScript£¬´«µÝ²ÎÊý£¬»ñµÃ·µ»ØÖµ£¬Èç¹ûµ÷ÓÃʧ°Ü£¬FlexÅ׳öÒ»¸öÒì³£¡£
ExternalInterface·â×°Á˶Ôä¯ÀÀÆ÷Ö§³ÖµÄ¼ì²é£¬¿ÉÒÔÓÃavailableÊôÐÔÀ´²é¿´¡£
ExternalInterfaceµÄʹÓ÷dz£¼òµ¥£¬Óï·¨ÈçÏ£º
flash.external.ExternalInterface.call(function_name: String[, arg1, ...]):Object;
²ÎÊý


Ïà¹ØÎĵµ£º

javascriptÕýÔò±í´ïʽ

ÍøÉÏÕýÔò±í´ïʽµÄ½Ì³Ì¹»¶àÁË£¬µ«ÓÉÓÚjavascriptµÄÀúÊ·±È½ÏÓƾã¬Ò²±È½Ï¹ÅÀÏ£¬Òò´ËÓÐÐí¶àÌØÐÔÊDz»Ö§³ÖµÄ¡£ÎÒÃÇÏÈ´Ó×î¼òµ¥µØ˵Æð£¬ÎÄÕÂËùÑÝʾµÄÕýÔò»ù±¾¶¼ÊÇperl·½Ê½¡£
Ôª×Ö·û
( [ { \ ^ $ | ) ? * + .
Ô¤¶¨ÒåµÄÌØÊâ×Ö·û

.table1 {
border:1px solid #666;border-collapse:collapse;width:7 ......

ÔÚLinuxÖÐʵÏÖ´óÈÝÁ¿ NAND FlashµÄYAFFS2Îļþϵͳ

·ÖÎöÁËǶÈëʽ»·¾³ÖÐYAFFS/YAFFS2ÎļþϵͳµÄÓŵ㣬Ìá³öYAFFS2²»½öÖ§³ÖСÈÝÁ¿µÄNAND flash£¬¶Ô´óÈÝÁ¿NAND flash¸ü¾ßÓÐÓÅÊÆ¡£²¢½éÉÜÁËYAFFS/YAFFS2Îļþϵͳ½á¹¹¡£×ÅÖؽ«YAFFS2ÎļþϵͳÔÚǶÈëʽLinuxϵͳÖеÄʵÏÖ¹ý³Ì°üÀ¨ÅäÖᢱàÒëÒÔ¼°²âÊÔÕû¸öÍêÕû¹ý³Ì×÷ÁËÏêϸµÄÂÛÊö¡£
¹Ø¼ü´Ê NAND flash£¬YAFFS/YAFFS2£¬Ç¶ÈëʽLinuxϵͳ
......

javascriptÔÚieÓëffÖеÄÇø±ð

JavascriptÖеij£¼ûÎÊÌâ

1. ¼¯ºÏÀà¶ÔÏóÎÊÌâ

ÏÖÓдúÂëÖÐÐí¶à¼¯ºÏÀà¶ÔÏóÈ¡ÓÃʱʹÓà ()£¬IE ÄܽÓÊÜ£¬Firefox ²»ÄÜ¡£
½â¾ö·½·¨£º¸ÄÓà [] ×÷ΪϱêÔËËã¡£È磺document.forms("formName") ¸ÄΪ
Js´úÂë
document.forms[
"formName"
];   
//ÓÖÈ磺
  
document.getEle ......

JAVASCRIPT ½Ì³Ì3 ¸¶Ê×ê¿

µÚ Èý ¼¯
--------------------------------------------------------------------------------
Ôø ÓÐ Ðí ¶à Íø ÓÑ ÎÊ ÎÒ ÓÐ ¹ØJavaScriptÓë ¿ò ¼Ü(Ϊ Çó ·½ ±ã£¬ ÒÔ Ï ¾ù ÓÃframe±í ʾ)ºÏ Óà µÄ ÎÊ Ìâ¡£ Ê ʵ ÉÏ£¬Èô Äú ͬ ʱ Ïë ÓÃframesºÍJavaScriptµÄ ¹¦ ÄÜ£¬
Ê× ÏÈ Äú ±Ø Ðè Óµ ÓÐNetscape Navigator 2.0 (»ò ÒÔ ......

JavaScriptÑ­Ðò½¥½ø£¨1£©

DOM
Document Object Model
ÊDZí´ïʽXMLÎĵµµÄ³£¼û·½Ê½£¬DOM¸ø¿ª·¢ÕßÌṩÁËÒ»ÖÖ¶¨Î»XML²ã¼¶½á¹¹µÄÖ±¹Û·½·¨¡£
 
½âÎö²¢ä¯ÀÀDOMÎĵµµÄÓÐЧ·½·¨ÎÞÒÉÄܼò»¯JavaScriptµÄ¿ª·¢¡£
¹é¸ù½áµ×£¬JavaScriptÖоø´ó²Ù×÷¶¼ÊÇJavaScriptºÍÍøÒ³ÀﲻͬµÄHTMLÔªËØÖ®¼äµÄ½»»¥£¬¶øDOMÔòÊǼò»¯ÕâÒ»¹ý³ÌµÄ³öÉ«¹¤¾ß¡£
 
ÀýÈ磺
» ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ