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

JavaScriptÖжÔÏóµÄ´´½¨

JavaScriptÖд´½¨¶ÔÏóµÄ·½·¨ÈçÏ£º
Ò»¡¢´´½¨¼òµ¥¶ÔÏó£º
×î¼òµ¥µÄ´´½¨¶ÔÏóµÄ·½·¨¾ÍÊÇÓÃÒ»¸öеÄObject£¬È»ºóÏòÆäÖÐÌí¼ÓÄÚÈÝ£º
 
ÏÖÔÚµ÷ÓÃmyObject.say(),½«µ¯³ö’gao’µÄ¾¯¸æ¿ò¡£
 
var myObject = new Object();
myObject.name = ‘gao’;
myObject.say = function(){
alert(this.name);
}

ÔÚJavaScriptÖУ¬Äã¿ÉÒÔÔÙÔËÐÐʱ´´½¨¶ÔÏó£¬ÔÚ¶ÔÏóµÄÕû¸öÉúÃüÖÜÆÚ¶¼¿ÉÒÔÏòËüÌí¼ÓÊôÐÔ¡£
ÊÂʵÉÏ£¬JavaScriptʵÏÖÖ»ÊÇ°ÑËùÓжÔÏóµ±×÷¹ØÁªÊý×é´¦Àí£¬ÀýÈ磬Äã¿ÉÒÔÏñÏÂÃæÕâÑùµ÷ÓøղŵöÔÏó£º
 
var name = myObject[‘name’];
myObject[‘say’]();
  
¶þ¡¢Ê¹ÓÃJSON´´½¨¶ÔÏó£º
ÉÏÃæ˵¹ý£¬JavaScriptÀïµÄ¶ÔÏó£¬Ö»ÊǹØÁªÊý×飬Õâ¾ÍÊÇJSON¿ÉÒÔÕý³£¹¤×÷µÄÒòËØ¡£ÓÃJSON´´½¨¶ÔÏóµÄÀý×ÓÈçÏ£º
var myObject = {
name : ‘gao’,
say : function{
alert(this.name);
}
}

ʹÓÃJSONºÍ¶¨ÒåÊý×é·Ç³£ÏàËÆ£¬³ýÁËÐèҪʹÓû¨À¨ºÅ¶ø²»ÊÇ·½À¨ºÅ¡£
ÔÚjQueryµÄÔ´ÂëÖоʹóÁ¿Ê¹ÓÃÁËÕâÖÖ·½Ê½¡£
 
Èý¡¢Ê¹ÓÃÀàµÄ·½Ê½¶¨Ò壺
ÔÚJavaScriptÖУ¬ËùÓк¯Êý¶¼ÊǶÔÏ󣬶øÀàʵ¼ÊÉϾÍÊÇÒ»¸öº¯Êý£¬Õâ¸öº¯Êý±»µ±×öÀàµÄ¹¹ÔìÆ÷À´Ìṩ·þÎñ¡£ÀඨÒåµÄ·½Ê½£¬ÈÃÄã´´½¨¶ÔÏóʱ£¬²»ÓÃÿ´Î¶¼´ÓÍ·¿ªÊ¼¡£
 
function MyClass(){
this.name = ‘gao’;
this.say = function(){
alert(this.name);
}
}
var myObject = new MyClass();
myObject.say();
  
 
ËÄ¡¢Ô­ÐÍ·¨£º
ÀඨÒåµÄ·½·¨ËäÈ»×öµ½ÁËÖØÓ㬵«ÊÇÒ²¿ÉÄÜ´øÀ´ÁË´úÂëµÄÈßÓ࣬ÒòΪÄãÿ´Î´´½¨¶ÔÏóʱ£¬¶¼»á¿½±´ÏàͬµÄ¸±±¾£¬µ±Äã²»ÐèÒªÕâЩ¿½±´µÄʱºò£¬±ã¿ÉÒÔʹÓÃÔ­ÐÍ¡£
Ô­Ð͵Ť×÷·½Ê½ÊÇ£¬µ±Äã¹¹ÔìÁËÒ»¸öеÄʵÀýʱ£¬¶¨ÒåÔÚ¶ÔÏóÔ­ÐÍÉϵÄËùÓÐÊôÐԺͷ½·¨£¬ÔÚÔËÐÐʱ¶¼»á¸½×ÅÔÚÄǸöеÄʵÀýÉÏ¡£
 
function MyClass(){
this.name = ‘gao’;
}
MyClass.prototype.say = function(){
alert(this.name);
}
var myObject = new MyClass();
myObject.say();
  
Ö´ÐеÄʱºò£¬Õâ·Ý´úÂë»áÕý³£¹¤×÷£¬Óë֮ǰ²»Í¬µÄÊÇ£¬ÎÞÂÛÄã´´½¨¶àÉÙ¸öʵÀý£¬ÔÚÄÚ´æÖÐsay()º¯ÊýÖ»ÓÐÒ»·ÝʵÀý¡£Õâ¸ö·½·¨Êµ¼ÊÉÏÊǸ½¼ÓÔÚÿ¸öʵÀýÉϵģ¬¶øÇÒthis¹Ø¼ü×ÖÊÇÔÚÔËÐÐʱ¼ÆËãµÄ¡£ËùÒÔÁ½¸öʵÀýµÄÔËÐл·¾³ÊÇÏà¶Ô¶ÀÁ¢µÄ£º
 
function MyCl


Ïà¹ØÎĵµ£º

asp.net½áºÏhtml£¬javascriptʵÏÖÎÞˢпçÓòÊý¾ÝÌá½»

ÐèÇó£º
AÓòÓÐÒ³Ãæa.html£¬ÆäÖÐÓÐiframe°üº¬BÓòµÄÒ³Ãæb.html£¬ÏÖÔÚҪͨ¹ýa.htmlÉϵÄÒ»¸ö°´Å¥£¬À´°Ña.htmlÒ³ÃæÉÏÒ»¸öÎı¾¿òµÄÖµ´«µÝµ½b.htmlÒ³ÃæµÄÎı¾¿ò¡£
×¢£ºÕâÀïb.htmlÊÇhtmlÍøÒ³£¬²»ÄܽÓÊÕÆäËûÍøÕ¾post¹ýÀ´µÄÖµ£¬ËùÒÔ²»ÄÜÓÃÖ±½ÓpostµÄ·½·¨À´´«Öµ£¬µ«ÊÇ£¬Èç¹û½ÓÊÕÒ³ÃæÊÇb.aspx»òÕßb.asp ÄØ£¬ÄDz»ÊÇ¿ÉÒÔÖ±½ÓpostÁËô£¿´ð ......

Îò͸Javascript(תÔØ)

Òý×Ó
    ±à³ÌÊÀ½çÀïÖ»´æÔÚÁ½ÖÖ»ù±¾ÔªËØ£¬Ò»¸öÊÇÊý¾Ý£¬Ò»¸öÊÇ´úÂë¡£±à³ÌÊÀ½ç¾ÍÊÇÔÚÊý¾ÝºÍ´úÂëǧ˿ÍòÂƵľÀ²øÖгÊÏÖ³öÎÞÏÞµÄÉú»úºÍ»îÁ¦¡£
    Êý¾ÝÌìÉú¾ÍÊÇÎľ²µÄ£¬×ÜÏë±£³Ö×Ô¼º¹ÌÓеı¾É«£»¶ø´úÂëÈ´ÌìÉú»îÆã¬×ÜÏë¸Ä±äÕâ¸öÊÀ½ç¡£
 
  
Äã¿´£¬Êý¾Ý´úÂë¼äµÄ¹ØϵÓëÎï ......

javascript×Ö·û´®×ª³ÉÈÕÆÚºÍʱ¼äÀàÐÍ

javascriptÀïÃæûÓÐÏֳɵÄ×Ö·û´®×ª³ÉÈÕÆÚºÍʱ¼äÀàÐ͵ĺ¯Êý£¬Ö»ÄÜÀûÓÃnew Date(y,m,d,h,i,s,ms)»òÕßÆäËüÏàËƵĺ¯Êý½øÐÐת»¯
ÒÔÏÂÊÇÒ»¸öʾÀý
alert(strToDate('2009/1/5 16:40'));
//×Ö·û´®×ªÈÕÆÚÀàÐÍ
function strToDate(str) {
 var re=/^(\d{4})\/(\d{1,2})\/(\d{1,2}) (\d{1,2}):(\d{1,2})$/g
 if(re.tes ......

javascriptʼþϵͳµÄ·¢Õ¹Ê·2

×Û¹ÛÒ»¸öϵͳµÄ·¢Õ¹£¬ÎÞ·ÇÊÇ·¢ÏÖÒ»¸öÎÊÌâ¾Í°ÑËü¶ÀÁ¢³öÀ´½â¾öµô£¬Òò´ËËüµÄËùÓÐÄ£¿é£¨»òÕß·ÖÖ§£©ÆäʵÕë¶Ô¶ÀÁ¢µÄÎÊÌ⣬ÕâÑùÎÒÃǶÔÕâЩÎÊÌâÈôÓÐʲô¸üºÃµÄ½â¾ö·½·¨£¬Ìæ»»ÏàÓ¦µÄÄ£¿é±ãÊÇ£¬Òª²»´úÂë»ìÔÓÔÚÒ»Æðû·¨¿´ÁË¡£ÉÏÒ»²¿·Ö¾ÍÌáµ½ÁË£¬attachEventµÄʼþÁжӳöÁËЩÎÊÌ⣬ÎÒÃÇÒªÊÖ¶¯¹¹½¨ÁжÓÁË¡£ËùνÁжӾÍÊÇÓÐÏÈÓкóµÄÎÊÌâ£¬Ò ......

javascriptÖÐÊý×éÔªËØɾ³ý

var arr=['a','b','c'];   
¡¡¡¡ÈôҪɾ³ýÆäÖеÄ'b',ÓÐÁ½ÖÖ·½·¨£º  
¡¡¡¡1.delete·½·¨:delete arr[1]   
¡¡¡¡ÕâÖÖ·½Ê½Êý×鳤¶È²»±ä,´Ëʱarr[1]±äΪundefinedÁË,µ«ÊÇÒ²Óкô¦Ô­À´Êý×éµÄË÷ÒýÒ²±£³Ö²»±ä,´ËʱҪ±éÀúÊý×éÔªËØ¿ÉÒÔ²ÅÓà  
¡¡¡¡for(index in arr)& ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ