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

¡¶Îò͸javascript¡·Ñ§Ï°±Ê¼Ç£ºÆß¡¢¶ÔÏóÃèÊö

ÒýÑÔ
 
      ÔÚJavaScriptÖÐÎÒÃÇʹÓÃÁËÒ»ÖÖ±»³ÆÎª JavaScript Object Notation(ËõдJSON)µÄÐÎʽ£¬·­ÒëΪÖÐÎľÍÊÇ“JavaScript¶ÔÏó±íʾ·¨”¡£Ëü¿ÉÒÔ¼ò½éÇåÎúµØ½«¶ÔÏóµÄ½á¹¹ÃèÊö³öÀ´£¬´Ó¶ø´ó´ó½µµÍÁËÎÒÃǵŤ×÷Á¿²¢¼õÉÙÁËÊý¾ÝÁ¿¡£
 
JsonʾÀý
 
<script language="javascript">
//´´½¨Ò»¸öûÓÐÈκÎÊôÐԵĶÔÏó
var o = {}
 
//´´½¨Ò»¸ö¶ÔÏó,²¢ÉèÖÃÊôÐԺͳõʼֵ
var person = {name:"myname", age:24, married:true}
 
//¸´ÔÓ¶ÔÏó
var company = {
   name : "MicroSoft",
   boss : {name:"BillGates", age:55},
   employees : [{name:"eeA", age:30},{name:"eeB", age:33}],
   readme : function(){alert(this.name + "'s boss is " + this.boss.name);}
}
company.readme();
</script>
 
Json¹æÔò
 
Æäʵ´ÓÉÏÃæµÄÀý×ӾͿÉÒÔ×ܽá³öjsonµÄ¹æÔòÁË£¬jsonÆäʵ¾ÍÊǼüÖµ¶ÔµÄ¼¯ºÏ£¬ÈçÏ£º
1.       ¼üÖµ¶Ô¼¯ºÏ±ØÐëÔÚ´óÀ¨ºÅÖ®¼ä£¬È磺{…}
2.       ¼üÖµÖ®¼äʹÓÃðºÅ·Ö¸ô£¬È磺name:”myName”
3.       ¼üÖµ¶ÔÖ®¼äʹÓöººÅ·Ö¸ô£¬È磺name:”myName”, age:23
4.       Èç¹ûÊÇÊý×éµÄ»°Ê¹ÓÃÖÐÀ¨ºÅ£¬È磺[{name:”haha”, age:21},{name:”myName”, age:23}]
 
 


Ïà¹ØÎĵµ£º

JavaScript ´´½¨Êý×éµÄ·½·¨ºÍ»ù±¾²Ù×÷

Êý×éÊÇÎÒ´Óѧϰ±à³ÌÒÔÀ´´ò½»µÀ×î¶àµÄÒ»ÖÖÊý¾ÝÀàÐÍ£¬Æäʵ˵°×ÁË£¬Êý×éÎ޷ǾÍÊÇkey value¶Ô¡£»¹¼ÇµÃ¸Õ²Î¼Ó¹¤×÷Äǻᣬһ¸öphpµÄforeachÑ­»·¾Í²îµã¸ãµÃÎÒÍÂѪ£¬ÏÖÔÚ»ØÍ·ÏëÏ룬µ±Ê±×Ô¼ºÕæ¹»±¿µÄ¡£
Êý×é(array)ÊÇÒ»ÖÖÊý¾ÝÀàÐÍ£¬Ëü°üº¬»òÕß´æ´¢Á˱àÂëµÄÖµ£¬Ã¿¸ö±àÂëµÄÖµ³Æ×÷¸ÃÊý×éµÄÒ»¸öÔªËØ(element),ÿ¸öÔªËØµÄ±àÂë±»³Æ×÷Ï ......

JavascriptµÄhistory¶ÔÏó

history¶ÔÏó3¸ö·½·¨back()¡¢forward()ºÍgo()£¬ÕâЩ·½·¨¿ÉÒÔµ÷ÓÃÀúÊ·±íÖаüº¬µÄÎĵµ¡£
back()·½·¨×°ÈëÀúÊ·±íÖеÄǰһ¸öÒ³Ãæ£¬µÈЧÓÚä¯ÀÀÆ÷ÖеÄBack°´Å¥
forward()·½·¨×°ÈëÀúÊ·±íÖеĺóÒ»¸öÒ³Ãæ£¬µÈЧÓÚä¯ÀÀÆ÷ÖеÄForward°´Å¥
go()·½·¨½øÈëÀúÊ·±íÖеÄÌØ¶¨Îĵµ£¬¿ÉÒÔÈ¡ÕûÐβÎÊý»ò×Ö·û´®²ÎÊý
go(n)n>0ʱ£¬×°ÈëÀúÊ·±íÖÐµÄ ......

C#´úÂëÓëjavaScriptº¯ÊýµÄÏ໥µ÷ÓÃ

C#´úÂëÓëjavaScriptº¯ÊýµÄÏ໥µ÷ÓÃ
ÎÊ£º
1.ÈçºÎÔÚJavaScript·ÃÎÊC#º¯Êý?
2.ÈçºÎÔÚJavaScript·ÃÎÊC#±äÁ¿?
3.ÈçºÎÔÚC#ÖзÃÎÊJavaScriptµÄÒÑÓбäÁ¿?
4.ÈçºÎÔÚC#ÖзÃÎÊJavaScriptº¯Êý?
ÎÊÌâ1´ð°¸ÈçÏ£º
javaScriptº¯ÊýÖÐÖ´ÐÐC#´úÂëÖеĺ¯Êý£º
·½·¨Ò»£º1¡¢Ê×ÏȽ¨Á¢Ò»¸ö°´Å¥£¬ÔÚºǫ́½«µ÷Óûò´¦ÀíµÄÄÚÈÝдÈëbutton_clickÖÐ ......

¡¶Îò͸javascript¡·Ñ§Ï°±Ê¼Ç£º¶þ¡¢»Ø¹é¼òµ¥

ÒýÑÔ
 
ÒªÀí½â JavaScript£¬ÄãµÃÊ×ÏÈ·Å϶ÔÏóºÍÀàµÄ¸ÅÄ»Øµ½Êý¾ÝºÍ´úÂëµÄ±¾Ô­¡£Ç°ÃæËµ¹ý£¬±à³ÌÊÀ½çÖ»ÓÐÊý¾ÝºÍ´úÂëÁ½ÖÖ»ù±¾ÔªËØ£¬¶øÕâÁ½ÖÖÔªËØÓÖÓÐמÀ²ø²»ÇåµÄ¹ØÏµ¡£JavaScript¾ÍÊǰÑÊý¾ÝºÍ´úÂë¶¼¼ò»¯µ½×îԭʼµÄ³Ì¶È¡£
 
»ù±¾ÀàÐÍ
Ò»¡¢¼òµ¥Êý¾ÝÀàÐÍ£ºundefined¡¢null¡¢boolean¡¢number¡¢string£¨×¢Ò⣺¶¼Ê ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØÍ¼ | ¸ÓICP±¸09004571ºÅ