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

javascriptдÀ෽ʽ֮¾Å

9¡¢YUIµÄдÀ෽ʽ
ÕâÀïÒýÈëµÄÊÇYUI 2.7.0°æ£¬Ö»ÐèÒýÈëyahoo.js¡£YUIÒýÈëÁËÃüÃû¿Õ¼ä£¬ÀàËÆÓÚjavaµÄ°ü¡£ÒÔÏÂyahooµÄ¹¤¾ßº¯Êý°ü
YAHOO.namespace
YAHOO.lang
YAHOO.lang.hasOwnProperty
YAHOO.lang.extend
YAHOO.lang.augment
YAHOO.log
YAHOO_config and YAHOO.env
YUI Module Names
дÀ෽ʽ£º
//¶¨Òå°üÃû
YAHOO.namespace("test");
//¶¨ÒåÀà
YAHOO.test.Person = function(name) {
this.name = name;
}
YAHOO.test.Person.prototype.setName = function(name){ this.name = name;}
YAHOO.test.Person.prototype.getName = function(){ return this.name;}
//´´½¨Ò»¸ö¶ÔÏó
var p = new YAHOO.test.Person("jack");
console.log(p.getName());//jack
p.setName('tom');
console.log(p.getName());//tom
//²âÊÔinstanceof¼°p.constructorÊÇ·ñÕýÈ·Ö¸ÏòÁËYAHOO.test.Person
console.log(p instanceof YAHOO.test.Person);
console.log(p.constructor == YAHOO.test.Person);

¿ÉÒÔ¿´³ö³ýÁ˶àÁ˰üÃû£¬ÓëµÚÈýÖÖдÀ෽ʽ
²¢ÎÞÇø±ð¡£


Ïà¹ØÎĵµ£º

javascript typeofµÄÓ÷¨

javascript typeofµÄÓ÷¨
¾­³£»áÔÚjsÀïÓõ½Êý×é,±ÈÈç ¶à¸öÃû×ÖÏàͬµÄinput, ÈôÊǶ¯Ì¬Éú³ÉµÄ, Ìύʱ¾ÍÐèÒªÅÐ¶ÏÆäÊÇ·ñÊÇÊý×é.
if(document.mylist.length != "undefined" ) {} Õâ¸öÓ÷¨ÓÐÎó.
ÕýÈ·µÄÊÇ if( typeof(document.mylist.length) != "undefined" ) {}
»ò if( !isNaN(document.mylist.length) ) {}
typeofµÄÔË ......

javascriptÑéÖ¤2

// JScript Îļþ
/********************************************************/
/*Åж¨·µ»ØÖµÎªtrue»òfalse*/
/********************************************************/
//´ò¿ªÒ»¸öÐÂÁ´½Ó
function   openwindow()
  {
    //var $j = jQuery.noConflict();
    ......

ÄãµÄµÚÒ»¸öJavascript·þÎñÆ÷¶Ë³ÌÐò(Ò»)

Ô­ÎÄ£ºhttp://www.webreference.com/programming/javascript/rg39/ ×÷ÕߣºRob Gravelle
°æÈ¨ÉùÃ÷£º·­Òë×÷Æ·£¬»¶Ó­×ªÔØ£¬×ªÔØÊ±ÇëÎñ±ØÒÔ³¬Á´½ÓÐÎʽ±êÃ÷ÎÄÕÂԭʼ³ö´¦ ¡¢×÷ÕßÐÅÏ¢ºÍ±¾ÉùÃ÷¡£
 
ÔÚJavascript·þÎñÆ÷¶Ë±à³Ì½éÉÜÒ»ÎÄÖУ¬ÎÒÃÇѧϰÁËAptana Jaxer·þÎñÆ÷£¬ËüÊÇÒ»¸öÏñApache¡¢Jetty»òÕßTomcatÕâЩ·þÎ ......

javascriptдÀ෽ʽ֮Áù

ÕâÆª¿ªÊ¼»á·ÖÎöÁ÷ÐеÄjs¿â֮дÀ෽ʽ¡£¸÷ÖÖ¿âµÄдÀ෽ʽËäÈ»Ç§Ææ°Ù¹Ö£¬µ«ÈÔÈ»ÌÓÀë²»Á˱¾ÖÊ---Óù¹Ô캯ÊýºÍÔ­ÐÍ
À´×é×°Àà¡£
6¡¢Prototype.jsµÄдÀ෽ʽ
//prototype.jsÖеĴúÂë
var Class = {
create: function() {
return function() {
this.initialize.apply(this, arguments);
}
}
}
//¼ò»¯ ......

javascriptдÀ෽ʽ֮°Ë

8¡¢Ext.jsµÄдÀ෽ʽ
ÕâÀïÓõÄÊÇExt core3.0£¬ExtÖÐÓÃExt.extendÀ´¶¨ÒåÒ»¸öÀࣨµ±È»Ëü¸ü¶àÓÃÀ´À©Õ¹Ò»¸öÀࣩ£¬ExtÕû¸ö¿ò¼Ü¸÷ÖֿؼþÈçPanel£¬MessageBoxµÈ¶¼ÊÇÓÃExt.extend·½·¨À´À©Õ¹¡£ÕâÀï½ö½öÓÃËüÀ´¶¨ÒåÒ»¸ö×î¼òµ¥µÄÀà¡£
¿´Ext.extendµÄ´úÂë¿ÉµÃÖª£¬ËüÈÔÈ»ÊÇÓù¹Ô캯ÊýºÍÔ­ÐÍÀ´×é×°Ò»¸öÀà¡£
ÕâÀïÖ»Ðè´«Á½¸ö²ÎÊý¼´¿É£¬µÚÒ ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØÍ¼ | ¸ÓICP±¸09004571ºÅ