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

JavaScriptÊý¾ÝÀàÐÍ

JavaScript ÓÐÁùÖÖÊý¾ÝÀàÐÍ¡£Ö÷ÒªµÄÀàÐÍÓÐ number¡¢string¡¢object ÒÔ¼° Boolean ÀàÐÍ,ÆäËûÁ½ÖÖÀàÐÍΪ null ºÍ undefined¡£
¡¡¡¡ String ×Ö·û´®ÀàÐÍ:×Ö·û´®ÊÇÓõ¥ÒýºÅ»òË«ÒýºÅÀ´ËµÃ÷µÄ¡££¨Ê¹Óõ¥ÒýºÅÀ´ÊäÈë°üº¬ÒýºÅµÄ×Ö·û´®¡££©È磺“The cow jumped over the moon.”
ÊýÖµÊý¾ÝÀàÐÍ£ºJavaScript Ö§³ÖÕûÊýºÍ¸¡µãÊý¡£ÕûÊý¿ÉÒÔΪÕýÊý¡¢0 »òÕ߸ºÊý£»¸¡µãÊý¿ÉÒÔ°üº¬Ð¡Êýµã¡¢Ò²¿ÉÒÔ°üº¬Ò»¸ö “e”£¨´óСд¾ù¿É£¬ÔÚ¿Æѧ¼ÇÊý·¨Öбíʾ“10µÄÃÝ”£©¡¢»òÕßͬʱ°üº¬ÕâÁ½Ïî¡£
Boolean ÀàÐÍ£º¿ÉÄÜµÄ Boolean ÖµÓÐ true ºÍ false¡£ÕâÊÇÁ½¸öÌØÊâÖµ£¬²»ÄÜÓÃ×÷ 1 ºÍ 0¡£
Undefined Êý¾ÝÀàÐÍ£ºÒ»¸öΪ undefined µÄÖµ¾ÍÊÇÖ¸ÔÚ±äÁ¿±»´´½¨ºó£¬µ«Î´¸ø¸Ã±äÁ¿¸³ÖµÒÔÇ°Ëù¾ßÓеÄÖµ¡£
Null Êý¾ÝÀàÐÍ£ºnull Öµ¾ÍÊÇûÓÐÈκÎÖµ£¬Ê²Ã´Ò²²»±íʾ¡£
objectÀàÐÍ£º³ýÁËÉÏÃæÌáµ½µÄ¸÷ÖÖ³£ÓÃÀàÐÍÍ⣬¶ÔÏóÒ²ÊÇJavaScriptÖеÄÖØÒª×é³É²¿·Ö£¬Õⲿ·Ö½«ÔÚºóÃæÕ½ÚÏêϸ½éÉÜ¡£
¡¡¡¡ÔÚ JavaScript ÖбäÁ¿ÓÃÀ´´æ·Å½Å±¾ÖеÄÖµ£¬ÕâÑùÔÚÐèÒªÓÃÕâ¸öÖµµÄµØ·½¾Í¿ÉÒÔÓñäÁ¿À´´ú±í£¬Ò»¸ö±äÁ¿¿ÉÒÔÊÇÒ»¸öÊý×Ö£¬Îı¾»òÆäËüһЩ¶«Î÷¡£
¡¡¡¡ JavaScriptÊÇÒ»ÖÖ¶ÔÊý¾ÝÀàÐͱäÁ¿ÒªÇó²»Ì«ÑϸñµÄÓïÑÔ£¬ËùÒÔ²»±ØÉùÃ÷ÿһ¸ö±äÁ¿µÄÀàÐÍ£¬±äÁ¿ÉùÃ÷¾¡¹Ü²»ÊDZØÐëµÄ£¬µ«ÔÚʹÓñäÁ¿Ö®Ç°ÏȽøÐÐÉùÃ÷ÊÇÒ»ÖֺõÄÏ°¹ß¡£¿ÉÒÔʹÓà var Óï¾äÀ´½øÐбäÁ¿ÉùÃ÷¡£È磺var men = true; // men Öд洢µÄֵΪ Boolean ÀàÐÍ¡£
¡¡¡¡±äÁ¿ÃüÃû:JavaScript ÊÇÒ»ÖÖÇø·Ö´óСдµÄÓïÑÔ£¬Òò´Ë½«Ò»¸ö±äÁ¿ÃüÃûΪ computer ºÍ½«ÆäÃüÃûΪ ComputerÊDz»Ò»ÑùµÄ¡£
¡¡¡¡ÁíÍ⣬±äÁ¿Ãû³ÆµÄ³¤¶ÈÊÇÈÎÒâµÄ£¬µ«±ØÐë×ñÑ­ÒÔϹæÔò£º
¡¡¡¡ 1.µÚÒ»¸ö×Ö·û±ØÐëÊÇÒ»¸ö×Öĸ£¨´óСд¾ù¿É£©¡¢»òÒ»¸öÏ»®Ïß(_)»òÒ»¸öÃÀÔª·û ($)¡£
¡¡¡¡ 2.ºóÐøµÄ×Ö·û¿ÉÒÔÊÇ×Öĸ¡¢Êý×Ö¡¢Ï»®Ïß»òÃÀÔª·û¡£
¡¡¡¡ 3.±äÁ¿Ãû³Æ²»ÄÜÊDZ£Áô×Ö¡£
ÐèҪעÒâjsÀïÃævar£¬Ëü¿ØÖÆÁ˱äÁ¿µÄ×÷Ó÷¶Î§¡£º¯ÊýÄڵıäÁ¿Ö»Òª´øÓÐvar£¬ÄÇôº¯ÊýÄÚÓõÄÕâ¸ö±äÁ¿¾ÍºÍº¯ÊýÍâµÄÎ޹ء£
¡¡¡¡
var a£»
c=new function(){var a=1;alert(typeof(a));};
alert(typeof(a));
½á¹ûΪ£ºnumber£¬undefined£»
var a=1£»
c=new function(){alert(typeof(a));var a=1;};
alert(typeof(a));
½á¹ûΪ£ºundefined£¬number£»
var a£»
c=new function(){alert(typeof(a));a=1;};
alert(typeof(a));
½á¹ûΪ£ºundefined£¬number£»
var a£»
c=new function(){var a=1;alert(typeof(a));};¿ÉÒÔÔ


Ïà¹ØÎĵµ£º

Javascript ÔÚASP.net ĸ°åҳϷÃÎÊ ¿Ø¼þID£º

Javascript ÔÚASP.net ĸ°åҳϷÃÎÊ ¿Ø¼þID£º
¶ÔÓÚ html control : Ö±½Ó·ÃÎÊID
document.getElementById("hfRespondID");
¶ÔÓÚ Web control :
document.getElementById("<%= this.hfRespondID.ClientID %>") [×¢Òâ´óСд
]     
     &nb ......

javascript»ñµÃÑ¡ÖÐÐÅÏ¢


javascript»ñµÃÑ¡ÖÐÐÅÏ¢
filed in javascript post by onelong on2009-12-18 13:57 Friday
×î½üä¯ÀÀ±ðÈ˵IJ©¿Íʱ,¿´µ½±ðÈ˵Ļ®´ÊËÑË÷ºÜ¿É°®£¡Í»È»Áé»úÒ»¶¯£¬ÎÒÏëËûÊÇÔõÑù»ñÈ¡ÎÒÃǵÄÑ¡ÖеÄÎÄ×ÖÄØ£¿ÕâÑùµÄjavascript½»»¥ÕæµÄºÜÈËÐÔ»¯£¡
µ±È»»ñÈ¡Ò³ÃæÑ¡ÖеÄÄÚÈÝÔÚhtml±à¼­Æ÷Ò²ÊǺܳ£Óõģ¡ÈçÒªÐÞ¸ÄijЩ×ÖÌ壬¾Í¿ÉÒÔÏÈÑ¡Ö ......

javaScript keyCode Áбí


×ÖĸºÍÊý×Ö¼üµÄ¼üÂëÖµ(keyCode)
°´¼ü
¼üÂë
°´¼ü
¼üÂë
°´¼ü
¼üÂë
°´¼ü
¼üÂë
A
65
J
74
S
83
1
49
B
66
K
75
T
84
2
50
C
67
L
76
U
85
3
51
D
68
M
77
V
86
4
52
E
69
N
78
W
87
5
53
F
70
O
79
X
88
6
54
G
71
P
80
Y
89
7
55
H
72
Q
81
Z
90
8 ......

JavaScript³õѧÕßÖ¸ÄÏ

 
±¾ÎÄÒë×Ô£ºhttp://www.codeproject.com/KB/scripting/jsbeginner.aspx
Ô­ÎÄ£ºJavaScript For Beginners
ÊÊÒ˶ÔÏó£ºJavaScript³õѧÕß¡£
 
Ŀ¼£º
 
°üº¬ÓëÒýÈë(Embedding,including)
write ºÍ writeln
Îĵµ¶ÔÏó£¨document object£©
bgColor ºÍ fgColor
ÏûÏ¢¿ò£¨Message Box£©
±äÁ¿£¨Variables ......

µ÷ÓÃjavascriptÀïµÄÖÐÎÄÐÅϢʱ²úÉúÂÒÂëµÄ½â¾ö·½·¨

ÔÚ×öÒ»¸ö×÷ҵʱµ÷ÓÃÍⲿµÄjavascriptÎļþÖеÄÖÐÎÄÐÅϢʱÏÔʾÂÒÂë¡£
ÔÚÉùÃ÷µ÷ÓÃjsµÄ±êÇ©ÖмÓÈëcharset="gb2312"¡£
È磺
<script type="text/javascript" src="check.js" charset="gb2312" > </script> ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ