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);
¿ÉÒÔ¿´³ö³ýÁ˶àÁË°üÃû£¬ÓëµÚÈýÖÖдÀ෽ʽ
²¢ÎÞÇø±ð¡£
Ïà¹ØÎĵµ£º
±¾ÎÄÖ÷ÒªÊdzöÓÚÓÐÅóÓÑʹÓÃÎÒÔÀ´Ð´µÄautocompleteµÄJS¿Ø¼þ¡£µ±Êý¾ÝÁ¿´óµÄʱºò£¬»á³öÏÖЧÂʼ«ÆäÂýµÄÇé¿ö£¬ÎÒÔÚÕâ¶Îʱ¼ä×ö³öµÄһЩ²âÊÔÒ²¼°Ò»Ð©¾Ñ飬Óë´ó¼Ò·ÖÏí£¬Èç¹ûÓдíµÄµØ·½£¬»¹ÇëÖ¸³ö¡£
¾¹ý²âÊÔ£¬ÎÒÃǻᷢÏÖÈçϵÄÇé¿ö»òÕß˵µÄ½áÂÛ£¬Èç¹ûÄúµÄ²âÊÔ½á¹ûÓëÎҵIJ»·û£¬Çë˵Ã÷ÔÒò£¬ÒÔ±ãÏ໥ѧϰ¡£
1£©µ±Ò»¸ö½Ï´óµÄHTML×Ö· ......
1¡¡¾Ö²¿´òÓ¡·½·¨£º
×÷Ó㺽«idΪdayinµÄÄÚÈÝ£¬Ð½¨Ò³Ãæ²¢´òÓ¡£¬¿É½â¾ö´òӡijҳÃæÖеIJ¿·ÖÄÚÈݵÄÎÊÌâ¡£
ʹÓ÷½·¨£º½«Òª´òÓ¡µÄÄÚÈÝͨ¹ý <span id="dayin"></span>°üº¬ÆðÀ´£¬È»ºóÔÚij¸ö°´Å¤Öж¨Òå
ʼþ
<input type="button" onclick="dayin()" value="´òÓ¡">
function dayin()
{
......
JS Check£º
javascriptlint http://www.javascriptlint.com/index.htm
jslint http://www.jslint.com/
JS UT£º
http://www.jsunit.net/
JS ST£º
http://www.outofhanwell.com/ieleak/index.php?title=Main_Page Drip
http://blogs.msdn.com/gpde/pages/javascript-memory-leak-detector.aspx
http://blogs.msdn. ......
Build your web applications quickly and easily using the industry leading web application IDE -- Aptana Studio.
Introduction:
Aptana Studio is a complete web development environment that combines powerful authoring tools for HTML, CSS, and JavaScript, along with thousands of additional plugins ......
7¡¢dojo.jsµÄдÀ෽ʽ
dojo×îÐÂÊÇ1.3.1ÁË£¬¼ÇµÃ07Äêʱ»¹ÊÇ0.4¡£ÎĵµÒ²½¥½¥¶àÁËÆðÀ´£¬ÓÃdojoµÄÒ²ÂýÂý¶àÁË¡£dojo»¹·¢²¼ÁËcore°æ£¬Ñ¹ËõºóÖ»ÓÐ
27kb¡£dojoÖÐÓÃdojo.declare·½·¨À´¶¨ÒåÒ»¸öÀà¡£dojo.declareµÄÔ´Âë¾Í²»ÌùÔÚÕâÀïÁË¡£dojo.declareÓÐÈý¸ö²Î
Êý£¬
²ÎÊý1£ºÀàÃûclassName
²ÎÊý2£º¼Ì³ÐµÄÀàsuperclass
²ÎÊý3£º¹¹ÔìÆ÷ ......