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

javascriptÓëflashº¯ÊýÏ໥½»»¥

Java´úÂë import flash.external.ExternalInterface;   function hello(){   return "²âÊԳɹ¦ÁËŶ~~";       }   //ÔÊÐíflashµ÷ÓÃjsº¯Êý ²ÎÊý1£ºjsº¯ÊýÃû³Æ ²ÎÊý2£ºÏòjsº¯Êý´«µÝµÄ²ÎÊý ExternalInterface.call("hello", "jacky");   //ÔÊÐíjsµ÷ÓÃflashÖеĺ¯Êý ²ÎÊý1£ºÒªµ÷ÓÃflashº¯ÊýµÄjsº¯Êý£¬²ÎÊý2£º±»µ÷ÓÃflashº¯Êý ExternalInterface.addCallback("helloas",hello);  import flash.external.ExternalInterface;
function hello(){
return "²âÊԳɹ¦ÁËŶ~~";
}
//ÔÊÐíflashµ÷ÓÃjsº¯Êý ²ÎÊý1£ºjsº¯ÊýÃû³Æ ²ÎÊý2£ºÏòjsº¯Êý´«µÝµÄ²ÎÊý
ExternalInterface.call("hello", "jacky");
//ÔÊÐíjsµ÷ÓÃflashÖеĺ¯Êý ²ÎÊý1£ºÒªµ÷ÓÃflashº¯ÊýµÄjsº¯Êý£¬²ÎÊý2£º±»µ÷ÓÃflashº¯Êý
ExternalInterface.addCallback("helloas",hello);
½ÓÏÂÀ´ÊÇ JSPÒ³Ãæ
°ÑÄãÉú³ÉSWF Îļþ·ÅÈ빤³ÌÏàÓ¦µÄĿ¼Ï  °Ñ·¾¶×Ô¼ºµÄ·¾¶¾Í¿ÉÒÔÁË
µ±È»
Java´úÂë
  
  
  
  
      
    ²âÊÔ  
      
        function callfromFlash() {  
            alert("11")  
            var a=thisMovie("test").helloas();  
            alert(a);  
        }  
        function hello(v)  
        {  
            alert(v) ;  
        }  
//thisMoivie ²ÎÊý£ºÊÇswfÎļþ µÄid 
        function thisMovie(movieName) {  
if (navigator.appName.indexOf("Microsoft")


Ïà¹ØÎĵµ£º

javascriptÃæÏò¶ÔÏóÈ«ÐÂÀíÁ·(ËÄ)

ÀûÓÃÔ­Ðͼ̳еĹؼüÓÐÁ½²½²Ù×÷£º
Ê×ÏÈ´´½¨Ò»¸ö¸¸ÀàµÄʵÀý»¯¶ÔÏó£¬È»ºó½«¸Ã¶ÔÏ󸳸ø×ÓÀàµÄ prototype ÊôÐÔ¡£
ÕâÑù£¬¸¸ÀàÖеÄËùÓй«ÓÐʵÀý³ÉÔ±¶¼»á±»×ÓÀà¼Ì³Ð¡£²¢ÇÒÓà instanceof ÔËËã·ûÅжÏʱ£¬×ÓÀàµÄʵÀý»¯¶ÔÏó¼ÈÊôÓÚ×ÓÀ࣬ҲÊôÓÚ¸¸Àà¡£
È»ºó½«×ÓÀà±¾Éí¸³Öµ¸øËüµÄ prototype µÄ constructor ÊôÐÔ¡££¨×¢Ò⣺ÕâÀ︳ֵµÄʱº ......

javascript»ù´¡Ñ§Ï°£¨Î壩

ÀûÓõ÷Óü̳еĹؼüÖ»ÓÐÒ»²½²Ù×÷£º
¾ÍÊÇÔÚ×ÓÀඨÒåʱ£¬Í¨¹ý¸¸ÀàµÄ call ·½·¨£¬½«×ÓÀàµÄ this Ö¸Õë´«È롣ʹ¸¸Àà·½·¨ÔÚ×ÓÀàÉÏÏÂÎÄÖÐÖ´ÐС£
ÕâÑù£¬¸¸ÀàÖеÄËùÓÐÔÚ¸¸ÀàÄÚ²¿Í¨¹ý this ·½Ê½¶¨ÒåµÄ¹«ÓÐʵÀý³ÉÔ±¶¼»á±»×ÓÀà¼Ì³Ð¡£
Óà instanceof ÔËËã·ûÅжÏʱ£¬×ÓÀàµÄʵÀý»¯¶ÔÏóÖ»ÊôÓÚ×ÓÀ࣬²»ÊôÓÚ¸¸Àà¡£
²é¿´×ÓÀàµÄʵÀý»¯¶ÔÏóµÄ ......

ѧϰJavaScript£¨¶þ£©

6¡¢»ùÓÚ¶ÔÏóµÄJavaScriptÓïÑÔ
JavaScriptÊÇ»ùÓÚ¶ÔÏóµÄµÄÓïÑÔ£¬²»ÏñÃæÏò¶ÔÏóÓгéÏ󡢼̳С¢ÖØÔصÈÓйØÃæÏò¶ÔÏóµÄ¹¦ÄÜ£¬µ«ÊÇËü»¹ÊǾßÓÐÃæÏò¶ÔÏóµÄ»ù±¾ÌØÕ÷£¬Ëü¿ÉÒÔ¸ù¾ÝÐèÒª´´½¨×Ô¼ºµÄ¶ÔÏ󣬴Ӷø½øÒ»²½À©´óJavaScriptµÄÓ¦Ó÷¶Î§£¬ÔöÇ¿±àд¹¦ÄÜÇ¿´óµÄWebÎĵµ¡£
¶ÔÏóµÄ»ù´¡ÖªÊ¶£º
¶ÔÏóÊÇÓÉÊôÐԺͷ½·¨Á½¸ö»ù±¾ÔªËØ×é³É¡£Ò»¸ö¶Ô ......

javascriptѧϰËæ±Ê(ʹÓÃwindowºÍframe)µÄ¼¼ÇÉ

JavaScriptÔÊÐí´´½¨ºÍ´ò¿ª´ú±íHTMLÎı¾, form¶ÔÏóºÍframeµÄ´°¿Ú.
window¶ÔÏóÊÇJavaScript¿Í»§²ã´Î½á¹¹µÄ×²ã¶ÔÏó,
formÔªËغÍÈ«²¿JavaScript´úÂ붼ÊÇ´æÔÚÓÚÎĵµÖÐ,¶øÎĵµ±»×°Ôؽø´°¿Ú. ΪÁËÀí½â´°¿ÚÔõÑù¹¤×÷,Äã¿ÉÒÔ¿ØÖƲÙ×÷ÕâЩ´°¿Ú.
´ò¿ªºÍ¹Ø±Õ´°¿Ú
µ±
Óû§Æô¶¯(launch)Navigatorʱ,½«×Ô¶¯´´½¨Ò»¸ö´°¿Ú.Óû§»¹¿ÉÒ ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ