JavaScriptºËÐIJο¼½Ì³Ì ÄÚÖöÔÏó
JavaScript ÊǸù¾Ý "ECMAScript"±ê×¼Öƶ¨µÄÍøÒ³½Å±¾ÓïÑÔ¡£Õâ¸ö±ê×¼ÓÉ ECMA ×éÖ¯·¢Õ¹ºÍά»¤¡£ECMA-262
ÊÇÕýʽµÄ JavaScript ±ê×¼¡£Õâ¸ö±ê×¼»ùÓÚ JavaScript (Netscape) ºÍ JScript
(Microsoft)¡£Netscape (Navigator 2.0) µÄ Brendan Eich ·¢Ã÷ÁËÕâÃÅÓïÑÔ£¬´Ó 1996
Ä꿪ʼ£¬ÒѾ³öÏÖÔÚËùÓÐµÄ Netscape ºÍ Microsoft ä¯ÀÀÆ÷ÖС£ECMA-262 µÄ¿ª·¢Ê¼ÓÚ 1996 Ä꣬ÔÚ 1997 Äê 7
Ô£¬ECMA »áÔ±´ó»á²ÉÄÉÁËËüµÄÊ׸ö°æ±¾¡£
±¾ÏµÁн̳ÌÖ¼ÔÚÏò´ó¼Ò·ÖÏí±¾È˵±ÄêѧϰJavascriptµÄ±Ê¼ÇºÍÐĵᣱ¾ÏµÁн̳ÌÔ¤¼Æ·ÖÎå¸ö²¿·Ö¡£
µÚÒ»²¿·Ö£ºJavascriptÄÚÖöÔÏó¡£
µÚ¶þ²¿·Ö£º¿Í»§¶ËJavaScript¡£
µÚÈý²¿·Ö£ºÎĵµ¶ÔÏóÄ£ÐÍ¡£
µÚËIJ¿·Ö£ºÃæÏò¶ÔÏó·â×°¼°±Õ°üµÄÓ¦Óá£
µÚÎ岿·Ö£ºÏµÁÐרÌâ(ÕýÔò±í´ïʽ£¬¿ò¼Üѧϰ£¬etc...)¡£
JavascriptÆäʵ²»ÊÇÒ»ÖÖÍêÈ«µÄÃæÏò¶ÔÏóµÄÓïÑÔ£¬×¼È·µÄ˵£¬Ó¦¸ÃÊÇÒ»ÖÖ»ùÓÚ¶ÔÏóµÄ±à³ÌÓïÑÔ£¬¾¡¹ÜÎÒÃÇ¿ÉÒÔÄ£ÄâÃæÏò¶ÔÏóµÄÌØÐÔ£¬µ«ÊÇÒ»µ©ÍÑÀë
ËüµÄÈÝÆ÷¼°Ò»Ð©»ù±¾µÄ¶ÔÏó×é¼þ£¬Javascript½«´ç²½ÄÑÐС£Èç¹ûȱÉÙDOM×é¼þµÄÖ§³Ö£¬ÎÒÃǾÍÎÞ·¨Ð´³öÓÅÑŽ»»¥ÐÔÁ¼ºÃµÄÓû§½çÃ棬Èç¹ûȱÉÙ
XMLHTTPRequest×é¼þµÄÖ§³Ö£¬ÎÒÃǽ«ÎÞ·¨ÊµÏÖ½»»¥ÐÔÁ¼ºÃµÄAjax¿Í»§¶Ë³ÌÐò¡£ËùÒÔ£¬ÒªÑ§ºÃJavascript£¬ÎÒÃDZØÐëºÜºÃµÄÕÆÎÕ
Javascript»ù±¾×é¼þµÄʹÓá£
ºÃ£¬ÎÒÃÇÏÂÃæ¾Í´ÓµÚÒ»²¿·Ö¿ªÊ¼£¬¿ªÊ¼½øÈëJavascriptÄÚÖöÔÏóÕ½ڵÄѧϰ¡£
È«¾ÖÊôÐÔ
Infinity
±íʾÕýÎÞÇî´óµÄÊýÖµ
NaN
·ÇÊý×ÖÖµ
undefined
䶨ÒåµÄÖµ
decodeURI()
¶ÔencodeURI()תÒåµÄ×Ö·û´®½âÂë¡£
decodeURIComponent()
¶ÔencodeURIComponent()תÒåµÄ×Ö·û´®½âÂë¡£
encodeURI()
·µ»Ø²ÎÊýµÄ¸±±¾,ÆäÖÐijЩ×Ö·û±»Ê®Áù½øÖƵÄתÒåÐòÁÐÌæ»»ÁË, ½¨ÒéʹÓÃencodeURIComponent()¶Ô×Ö·û´®½øÐбàÂë¡£
encodeURIComponent()
·µ»Ø²ÎÊýµÄ¸±±¾,ÆäÖÐijЩ×Ö·û±»Ê®Áù½øÖƵÄתÒåÐòÁÐÌæ»»ÁË¡£
escape()
ÓÃתÒåÐòÁÐÌ滻ijЩ×Ö·ûÀ´×Ö·û´®±àÂë¡£
eval()
¼ÆËãJavascript´úÂë´®,·µ»Ø½á¹û¡£
isFinite()
¼ìÑéÒ»¸öÖµÊÇ·ñÊÇÎÞÇî´óµÄÊý×Ö¡£
isNaN()
¼ìÑéÒ»¸öÖµÊÇ·ñÊÇ·ÇÊý×ÖµÄÖµ¡£
parseFloat()
´Ó×Ö·û´®½âÎöÒ»¸öÊý×Ö¡£
parseInt()
´Ó×Ö·û´®½âÎöÒ»¸öÊý×Ö¡£
unescape()
¶ÔÓÃescape()±àÂëµÄ×Ö·û´®½âÂë¡£
javascriptÄÚÖöÔÏó
Object¶ÔÏó
constructor
¶ÔÒ»¸öJavascriptº¯ÊýµÄÒýÓÃ,¸Ãº¯ÊýÊǶÔÏóµÄ¹¹Ô캯Êý¡£
hasOwnProperty()
¼ì²é¶ÔÏóÊÇ·ñÓоֲ¿¶¨ÒåµÄ(·Ç¼Ì³ÐµÄ)¡¢¾ßÓÐÌض¨Ãû×ÖµÄÊôÐÔ¡£
isPrototypeOf()
¼
Ïà¹ØÎĵµ£º
¡¾×ª¡¿http://www.cnblogs.com/chenxizhang/archive/2010/01/01/1637309.html
Èç¹ûÎÒÃÇÐèÒªÔÚjavascript·ÃÎʵ½Ò³ÃæÖж¨ÒåµÄ±äÁ¿£¬´óÖÂÊÇÈçϵÄÓï·¨
//ÕâÊÇ2010Äê1ÔÂ1ÈÕÔö¼ÓµÄ´úÂë
var ismanager = "<%= DepartManager %>";
if (ismanager == "true") {
$(" ......
¡¾×ª¡¿http://www.cnblogs.com/chenxizhang/archive/2010/01/01/1637309.html
Èç¹ûÎÒÃÇÐèÒªÔÚjavascript·ÃÎʵ½Ò³ÃæÖж¨ÒåµÄ±äÁ¿£¬´óÖÂÊÇÈçϵÄÓï·¨
//ÕâÊÇ2010Äê1ÔÂ1ÈÕÔö¼ÓµÄ´úÂë
var ismanager = "<%= DepartManager %>";
if (ismanager == "true") {
$(" ......
1¡¢Ê²Ã´ÊDZհü¡¢ÒÔ¼°±Õ°üËùÉæ¼°µÄ×÷ÓÃÓòÁ´ÕâÀï¾Í²»ËµÁË¡£
2¡¢JavaScriptÀ¬»ø»ØÊÕ»úÖÆ
JavaScript²»ÐèÒªÊÖ¶¯µØÊÍ·ÅÄڴ棬ËüʹÓÃÒ»ÖÖ×Ô¶¯À¬»ø»ØÊÕ»úÖÆ£¨garbage collection£©¡£µ±Ò»¸ö¶ÔÏóÎÞÓõÄʱºò£¬¼´³ÌÐòÖÐÎÞ±äÁ¿ÒýÓÃÕâ¸ö¶ÔÏóʱ£¬¾Í»á´ÓÄÚ´æÖÐÊͷŵôÕâ¸ö±äÁ¿¡£
Code
&nb ......
1.ÎÞÌáʾˢÐÂÍøÒ³
´ó¼ÒÓÐûÓз¢ÏÖ£¬ÓÐЩÍøÒ³£¬Ë¢ÐµÄʱºò£¬»áµ¯³öÒ»¸öÌáʾ´°¿Ú£¬µã“È·¶¨”²Å»áˢС£
¶øÓеÄÒ³Ãæ²»»áÌáʾ£¬²»µ¯³öÌáʾ´°¿Ú£¬Ö±½Ó¾ÍË¢ÐÂÁË.
Èç¹ûÒ³ÃæûÓÐform£¬Ôò²»»áµ¯³öÌáʾ´°¿Ú¡£Èç¹ûÒ³ÃæÓÐform±íµ¥
a)<
form method="post" ...> »áµ¯³öÌáʾ´°¿Ú
b)< form method="get" ...& ......
ʼþÔ´¶ÔÏó
event.srcElement.tagName
event.srcElement.type
²¶»ñÊÍ·Å
event.srcElement.setCapture();
event.srcElement.releaseCapture();
ʼþ°´¼ü
event.keyCode
event.shiftKey
event.altKey
event.ctrlKey
ʼþ·µ»ØÖµ
event.returnValue
Êó±êλÖÃ
eve ......