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

javascriptÊý×é²Ù×÷´óÈ«[ת]

 
shift£ºÉ¾³ýÔ­Êý×éµÚÒ»Ï²¢·µ»Øɾ³ýÔªËصÄÖµ£»Èç¹ûÊý×éΪ¿ÕÔò·µ»Øundefined
var a = [1,2,3,4,5];
var b = a.shift(); //a£º[2,3,4,5] b£º1
unshift£º½«²ÎÊýÌí¼Óµ½Ô­Êý×鿪ͷ£¬²¢·µ»ØÊý×éµÄ³¤¶È
var a = [1,2,3,4,5];
var b = a.unshift(-2,-1); //a£º[-2,-1,1,2,3,4,5] b£º7
×¢£ºÔÚIE6.0ϲâÊÔ·µ»ØÖµ×ÜΪundefined£¬FF2.0ϲâÊÔ·µ»ØֵΪ7£¬ËùÒÔÕâ¸ö·½·¨µÄ·µ»ØÖµ²»¿É¿¿£¬ÐèÒªÓ÷µ»Øֵʱ¿ÉÓÃsplice´úÌæ±¾·½·¨À´Ê¹Óá£
pop£ºÉ¾³ýÔ­Êý×é×îºóÒ»Ï²¢·µ»Øɾ³ýÔªËصÄÖµ£»Èç¹ûÊý×éΪ¿ÕÔò·µ»Øundefined
var a = [1,2,3,4,5];
var b = a.pop(); //a£º[1,2,3,4] b£º5
push£º½«²ÎÊýÌí¼Óµ½Ô­Êý×éĩ⣬²¢·µ»ØÊý×éµÄ³¤¶È
var a = [1,2,3,4,5];
var b = a.push(6,7); //a£º[1,2,3,4,5,6,7] b£º7
concat£º·µ»ØÒ»¸öÐÂÊý×飬Êǽ«²ÎÊýÌí¼Óµ½Ô­Êý×éÖй¹³ÉµÄ
var a = [1,2,3,4,5];
var b = a.concat(6,7); //a£º[1,2,3,4,5] b£º[1,2,3,4,5,6,7]
slice()Ô­À´ÊÇÓÃÀ´½ØÈ¡Êý×éÖеÄÒ»²¿·Ö£¬ÕâÀïÎÒÓÃËüÀ´¸´ÖÆÊý×飬ËüµÄ¸ñʽÈçÏ£º
array.slice(start, end)
Èç¹ûÊ¡ÂÔÁËend²ÎÊý£¬ÔòÇзֵÄÊý×é°üº¬´Óstart¿ªÊ¼µ½Êý×é½áÊøµÄËùÓÐÔªËØ¡£
ÏÖÔÚÒªÓÃËüÀ´¸´ÖÆÊý×飬¾ÍÒ»ÐÐ:
var newArray=oldArray.slice(0);
splice(start,deleteCount,val1,val2,...)£º´ÓstartλÖÿªÊ¼É¾³ýdeleteCountÏ²¢´Ó¸ÃλÖÃÆð²åÈëval1,val2,...
var a = [1,2,3,4,5];
var b = a.splice(2,2,7,8,9); //a£º[1,2,7,8,9,5] b£º[3,4]
var b = a.splice(0,1); //ͬshift
a.splice(0,0,-2,-1); var b = a.length; //ͬunshift
var b = a.splice(a.length-1,1); //ͬpop
a.splice(a.length,0,6,7); var b = a.length; //ͬpush
reverse£º½«Êý×é·´Ðò
var a = [1,2,3,4,5];
var b = a.reverse(); //a£º[5,4,3,2,1] b£º[5,4,3,2,1]
sort(orderfunction)£º°´Ö¸¶¨µÄ²ÎÊý¶ÔÊý×é½øÐÐÅÅÐò
var a = [1,2,3,4,5];
var b = a.sort(); //a£º[1,2,3,4,5] b£º[1,2,3,4,5]
slice(start,end)£º·µ»Ø´ÓÔ­Êý×éÖÐÖ¸¶¨¿ªÊ¼Ï±굽½áÊøϱêÖ®¼äµÄÏî×é³ÉµÄÐÂÊý×é
var a = [1,2,3,4,5];
var b = a.slice(2,5); //a£º[1,2,3,4,5] b£º[3,4,5]
join(separator)£º½«Êý×éµÄÔªËØ×éÆðÒ»¸ö×Ö·û´®£¬ÒÔseparatorΪ·Ö¸ô·û£¬Ê¡ÂԵĻ°ÔòÓÃĬÈÏÓöººÅΪ·Ö¸ô·û
var a = [1,2,3,4,5];
var b = a.join("|"); //a£º[1,2,3,4,5] b£º"1|2|3|4|5"


Ïà¹ØÎĵµ£º

javascript sort table & merge same column

˵Ã÷£º
appendChild()
ÎÒ²âÊԵĽá¹û£º
1 appendChild() ±í¸ñÖÐËùÓÐÐÐÑ­»·ÉÏÒÆÒ»ÐÐºó£¬ ÓÃеģ¨ÐУ©Ìæ»»ÁË ±í¸ñµÄÄ©ÐÐ £»Ï൱ÓÚÌæ»»Á˱í¸ñµÄµÚÒ»ÐУ¬²¢Ñ­»·ÉÏÒÆÒ»ÐÐ
2 ²»¸Ä±ä ±í¸ñµÄ×Ü ÐÐÊý
insertRow()
1 insertRow() ÔÚ±í¸ñÖвåÈëÒ»ÐУ¬±í¸ñ×ÜÐÐÊéÔöÒ»
2 insertRow(index) index=0 , ÔÚ±íÍ·Ôö¼Ó£¬ index=-1, ÔÚ± ......

javascriptÈçºÎÉèÖûñÈ¡GridViewÄ£°åÁеÄÖµ


Èç¹ûʹÓÃhtml¿Ø¼þ»¹ºÃһЩ£¬·þÎñÆ÷¿Ø¼þ¾Í±È½ÏÓôÃÆһЩ£¬ÒòΪGridViewÉú³ÉÖ®ºóÊǶàÐеģ¬ËùÒÔÕâ¸öÎı¾¿òÒ²»áÓкܶà¸ö£¬ÁíÒ»·½Ãæasp.net»á×Ô¶¯ÖØÐÂÃüÃû¿Ø¼þ£¬ËùÒÔÏëͨ¹ýID»ñÈ¡ÒѾ­²»¿ÉÄÜÁË£¬ºÜ²»ÐÒµÄÊÇÁ¬nameÊôÐÔ¶¼±»×Ô¶¯Éú³ÉÁË£¬ÄÄÅÂÄãÌí¼ÓÁËnameÊôÐÔ£¬Ò²ÎÞ·¨¸²¸ÇÉú³ÉµÄname£¬¶øÊÇ»á³öÀ´Á½¸önameÊôÐÔ
ÄÇô¾ÍÏë±ðµÄ°ì·¨£¬ ......

javaScript Rubicon

javascript ÊÇÒ»ÖÖÇø·Ö´óСдµÄ³ÌÐòÓïÑÔ.
¶¨ÒåÊý×é:
var strweek= new Array(7);
Îʺűí´ïʽ
var i= (condition)?A:B;
Ï൱ÓÚif-else Óï¾ä;condition ³ÉÁ¢ Ö´ÐÐA £¬²»³ÉÁ¢Ö´ÐÐB;
switch Óï¾ä
var i=3;
var result="";
swithck(i);
{
case 1;
 result="First"; 
case 2;
 result="Second";
ca ......

JavaScriptµÄ·½·¨ºÍ¼¼ÇÉ

JavaScriptµÄ·½·¨ºÍ¼¼ÇÉ ÊÕ²Ø
ÓÐЩʱºòÄ㾫ͨһÃÅÓïÑÔ£¬µ«ÊǻᷢÏÖÄãÆäʵÕûÌìÔÚºÍÆäËüÓïÑÔ´ò½»µÀ£¬Ò²ÐíÄãÒÔΪÕâЩ΢²»×ãµÀ£¬²»ÖÁÓÚÓ°ÏìÄãµÄ¿ª·¢½ø¶È£¬µ«Ç¡Ç¡ÊÇÕâЩÄã²»ÖØÊӵĶ«Î÷»áÀË·Ñ ÄãºÜ¶àʱ¼ä£¬ÎÒÒ»Ö±ÒÔΪÎÒÔçÔÚ¼¸ÄêÇ°¾ÍÒѾ­¾«Í¨JavaScriptÁË£¬Ö±µ½Ä¿Ç°£¬ÎÒ²ÅÔ½À´Ô½¾õµÃJavaScriptÔ¶±ÈÎÒÏëÏóµÄ¸´ÔÓºÍÇ¿´ó£¬ÎÒ¿ªÊ¼³ç ......

¿ªÆôJavaScriptµ÷ÊÔ

ÏÂÃæµÄ²Ù×÷²½ÖèÃèÊöÁËÔõÑùÀûÓÃvs.netÖеĵ÷ÊÔÆ÷À´µ÷ÊÔjavascript£º
1,Ê×ÏÈ£¬ÒªÈÃÄãµÄieÔÊÐíµ÷ÊԽű¾£¬¾ßÌå²½ÖèÈçÏÂ:
   ´ò¿ªie->¹¤¾ß²Ëµ¥->interÑ¡Ïî->¸ß¼¶Ñ¡Ï->È¥µô“½ûÖ¹½Å±¾µ÷ÊÔ"Ñ¡Ïî
2,´ò¿ªvs.net,´´½¨Ò»¸öеÄasp.netÏîÄ¿(»ò´ò¿ªÒ»¸ö)
3,ÔËÐÐÄãÒªµ÷ÊÔµÄÒ³Ãæ
4,µ±ÄãµÄÒ³Ãæ³ÊÏÖÔÚieÀ ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ