Ò׽ؽØͼÈí¼þ¡¢µ¥Îļþ¡¢Ãâ°²×°¡¢´¿ÂÌÉ«¡¢½ö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ЧÂʾ­Ñé̸(Ò»)

±¾ÎÄÖ÷ÒªÊdzöÓÚÓÐÅóÓÑʹÓÃÎÒÔ­À´Ð´µÄautocompleteµÄJS¿Ø¼þ¡£µ±Êý¾ÝÁ¿´óµÄʱºò£¬»á³öÏÖЧÂʼ«ÆäÂýµÄÇé¿ö£¬ÎÒÔÚÕâ¶Îʱ¼ä×ö³öµÄһЩ²âÊÔÒ²¼°Ò»Ð©¾­Ñ飬Óë´ó¼Ò·ÖÏí£¬Èç¹ûÓдíµÄµØ·½£¬»¹ÇëÖ¸³ö¡£
¾­¹ý²âÊÔ£¬ÎÒÃǻᷢÏÖÈçϵÄÇé¿ö»òÕß˵µÄ½áÂÛ£¬Èç¹ûÄúµÄ²âÊÔ½á¹ûÓëÎҵIJ»·û£¬Çë˵Ã÷Ô­Òò£¬ÒÔ±ãÏ໥ѧϰ¡£
1£©µ±Ò»¸ö½Ï´óµÄHTML×Ö· ......

javascript ÑéÖ¤´úÂëÕûÀí

//the common event,If your brower is firefox,you should use this function instead of "window.event"
function getEvent() {
if(document.all)
return window.event; //get ie event
func=getEvent.caller;
while(func!=null) {
......

15¸ö JavaScript Web UI ¿â

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

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

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

JavaScript ¼òµ¥Ê÷ÐÍ

<html>
 <head>
  <script type="text/javascript">
   function tree(treethis){
    if (treethis.alt == "+"){
     treethis.alt = "-";
     document.getElementById("bench").style. ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ