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

javascriptдÀ෽ʽ֮Îå

5¡¢Óà ¹¹Ô캯Êý+Ô­ÐÍ ¶¨ÒåÒ»¸öÀࣻͬһ¹¹Ô캯Êý¿ÉÒÔ¶¨Òå³ö¶à¸öÀàÐÍ



/**
* $define дÀ๤¾ßº¯ÊýÖ®¶þ
* @param {Object} constructor
* @param {Object} prototype
*/
function $define(constructor,prototype) {
var c = constructor || function(){};
var p = prototype || {};
return function() {
for(var atr in p)
arguments.callee.prototype[atr] = p[atr];
c.apply(this,arguments);
}
}

ÓëµÚËÄÖÖ·½Ê½ÀàËÆ£¬ÈÔÈ»Óù¹Ô캯Êý£¬Ô­ÐͶÔÏ󣬶¨ÒåÁ½¸öÀà¡£
//¹¹Ô캯Êý
function Person(name) {
this.name = name;
}
//Ô­ÐͶÔÏó
var proto = {
getName : function(){return this.name},
setName : function(name){this.name = name;}
}
//¶¨ÒåÁ½¸öÀà
var Man = $define(Person,proto);
var Woman = $define(Person,proto);
console.log(Man == Woman);//false,ͬһ¸ö¹¹Ô캯Êý£¨Person£©¶¨Ò岻ͬµÄÀà


Ïà¹ØÎĵµ£º

javascript¼¼ÇÉ´óÈ«

ʼþÔ´¶ÔÏó
event.srcElement.tagName
event.srcElement.type
²¶»ñÊÍ·Å
event.srcElement.setCapture();
event.srcElement.releaseCapture();
ʼþ°´¼ü
event.keyCode
event.shiftKey
event.altKey
event.ctrlKey
ʼþ·µ»ØÖµ
event.returnValue
Êó±êλÖÃ
event.x
event.y
´°Ìå»î¶¯ÔªËØ
d ......

JavaScript ¶ÔÏóÓëÊý×é²Î¿¼´óÈ«

±¾ÎÄÁоÙÁ˸÷ÖÖJavaScript¶ÔÏóÓëÊý×é,ͬʱ°üÀ¨¶ÔÉÏÊöÿһ¶ÔÏó»òÊý×éËùÍê³É¹¤×÷µÄ¼ò¶ÌÃèÊö,ÒÔ¼°ÓëÆäÏà¹ØµÄÊôÐÔ·½·¨,ÒÔ¼°Ê¼þ´¦Àí³ÌÐò¡£
¡¡¡¡B.1 anchor¶ÔÏó
¡¡¡¡Ê¹ÓÃ<A NAME=>±ê¼Ç´´½¨µÄHTMLÃèµãÄܱ»Ò»¸öÁ´½Ó×÷ΪĿ±êÈç¹ûêµã°üÀ¨HREF=ÌØÐÔ,ÔòËüÒ²ÊÇÒ»¸öÁ´½Ó¶ÔÏó¡£
¡¡¡¡anchor¶ÔÏóÊÇdocument¶ÔÏóµÄÒ»¸öÊôÐÔ,Ëü±¾Éíà ......

javascriptµÄһЩ¹¤¾ß

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. ......

15 ¸ö JavaScript Web UI ¿â

¼¸ºõËùÓеĸ» Web Ó¦Óö¼»ùÓÚÒ»¸ö»ò¶à¸ö Web UI ¿â»ò¿ò¼Ü£¬ÕâЩ UI
¿âÓë¿ò¼Ü¼«´óµØ¼ò»¯ÁË¿ª·¢½ø³Ì£¬²¢´øÀ´Ò»Ö£¬¿É¿¿£¬ÒÔ¼°¸ß¶È½»»¥ÐÔµÄÓû§½çÃæ¡£±¾ÎĽéÉÜÁË 15 ¸ö·Ç³£Ç¿´óµÄ JavaScript Web UI
¿â£¬·Ç³£Êʺϸ÷ÖÖ¸÷ÖÖ¹æÄ£µÄ¸» Web Ó¦ÓõĿª·¢¡£
LivePipe
LivePipe
UI
»ùÓÚ Prototype Javascript ¿ò¼Ü
£¬°üº ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ