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

Javascript µÄ´Ê·¨×÷ÓÃÓò¡¢µ÷ÓöÔÏóºÍ±Õ°ü

×÷ÓÃÓò Scope
Javascript Öеĺ¯ÊýÊôÓÚ´Ê·¨×÷ÓÃÓò£¬Ò²¾ÍÊÇ˵º¯ÊýÔÚËü±»¶¨ÒåʱµÄ×÷ÓÃÓòÖÐÔËÐжø²»ÊÇÔÚ±»Ö´ÐÐʱµÄ×÷ÓÃÓòÄÚÔËÐС£ÕâÊÇϬţÊéÉϵÄ˵·¨¡£µ«“¶¨Òåʱ”ºÍ“Ö´ÐУ¨±»µ÷Óã©Ê±”ÕâÁ½¸ö¶«Î÷ÓÐЩÈ˸㲻Çå³þ¡£¼òµ¥À´Ëµ£¬Ò»¸öº¯ÊýAÔÚ“¶¨Òåʱ”¾ÍÊÇ function A(){} Õâ¸öÓï¾äÖ´ÐеÄʱºò¾ÍÊǶ¨ÒåÕâ¸öº¯ÊýµÄʱºò£¬¶øA±»µ÷ÓõÄʱºòÊÇ A() Õâ¸öÓï¾äÖ´ÐеÄʱºò¡£ÕâÁ½¸ö¸ÅÄîÒ»¶¨Òª·ÖÇå³þ¡£
ÄÇ´Ê·¨×÷ÓÃÓò£¨ÒÔϳÆ֮Ϊ“×÷ÓÃÓò”£¬³ý·ÇÌرðÖ¸Ã÷£©µ½µ×ÊÇʲôÄØ£¿ËüÊǸö³éÏóµÄ¸ÅÄ˵°×ÁËËü¾ÍÊÇÒ»¸ö“·¶Î§”£¬scope ÔÚÓ¢ÎÄÀï¾ÍÊÇ·¶Î§µÄÒâ˼¡£Ò»¸öº¯ÊýµÄ×÷ÓÃÓòÊÇËü±»¶¨ÒåʱËüËù´¦µÄ“·¶Î§”£¬Ò²¾ÍÊÇËüÍâ²ãµÄ“·¶Î§”£¬Õâ¸ö“·¶Î§”°üº¬ÁËÍâ²ãµÄ±äÁ¿ÊôÐÔ£¬Õâ¸ö“·¶Î§”±»ÉèÖóÉÕâ¸öº¯ÊýµÄÒ»¸öÄÚ²¿×´Ì¬¡£Ò»¸öÈ«¾Öº¯Êý±»¶¨ÒåµÄʱºò£¬È«¾Ö£¨Õâ¸öº¯ÊýµÄÍâ²ã£©µÄ“·¶Î§”¾Í±»ÉèÖóÉÕâ¸öÈ«¾Öº¯ÊýµÄÒ»¸öÄÚ²¿×´Ì¬¡£Ò»¸öǶÌ׺¯Êý±»¶¨ÒåµÄʱºò£¬±»Ç¶Ì׺¯Êý£¨Íâ²ãº¯Êý£©µÄ“·¶Î§”¾Í±»ÉèÖóÉÕâ¸öǶÌ׺¯ÊýµÄÒ»¸öÄÚ²¿×´Ì¬¡£Õâ¸ö“ÄÚ²¿×´Ì¬”ʵ¼ÊÉÏ¿ÉÒÔÀí½â³É×÷ÓÃÓòÁ´£¬¼ûÏÂÎÄ¡£
µ±Ò»¸öº¯Êý±»µ÷ÓÃʱ£¬ÔÚÕâ¸öº¯ÊýÀËüÄÜ·ÃÎʵ½ËüµÄÕâ¸öÄÚ²¿×´Ì¬£¬Ò²¾Í¿ÉÒÔ·ÃÎÊÕû¸ö×÷ÓÃÓòÁ´ÉϵÄËùÓбäÁ¿£¬µ±È»Ò²¾Í°üÀ¨ÁËÍⲿ±äÁ¿¡££¨Êµ¼ÊÉÏÊÇ´Ó“µ÷ÓöÔÏóÁ´”Àï·ÃÎʵ½µÄ¡£ºÃÏñÓÐÎÊÌâ°É£¬Çë½Ó×ÅÔĶÁ¡££©
ÕÕÒÔÉÏ˵·¨£¬Ò»¸öº¯ÊýµÄ×÷ÓÃÓòÊÇËü±»¶¨ÒåµÄʱºòËù´¦µÄ“·¶Î§”£¬ÄÇô Javascript ÀïµÄº¯Êý×÷ÓÃÓòÊÇÔÚº¯Êý±»¶¨ÒåµÄʱºò¾ÍÈ·¶¨ÁË£¬ËùÒÔËüÊǾ²Ì¬µÄ×÷ÓÃÓò£¬´Ê·¨×÷ÓÃÓòÓÖ³ÆΪ¾²Ì¬×÷ÓÃÓò¡£
µ÷ÓöÔÏó Call Object
Ò»¸öº¯ÊýµÄµ÷ÓöÔÏóÊǶ¯Ì¬µÄ£¬ËüÊÇÔÚÕâ¸öº¯Êý±»µ÷ÓÃʱ²Å±»ÊµÀý»¯µÄ¡£ÎÒÃÇÒѾ­ÖªµÀ£¬µ±Ò»¸öº¯Êý±»¶¨ÒåµÄʱºò£¬ÒѾ­È·¶¨ÁËËüµÄ×÷ÓÃÓòÁ´¡£µ± Javascript ½âÊÍÆ÷µ÷ÓÃÒ»¸öº¯ÊýµÄʱºò£¬Ëü»áÌí¼ÓÒ»¸öеĶÔÏ󣨵÷ÓöÔÏ󣩵½Õâ¸ö×÷ÓÃÓòÁ´µÄÇ°Ãæ¡£Õâ¸öµ÷ÓöÔÏóµÄÒ»¸öÊôÐÔ±»³õʼ»¯³ÉÒ»¸öÃû½Ð arguments µÄÊôÐÔ£¬ËüÒýÓÃÁËÕâ¸öº¯ÊýµÄ Arguments ¶ÔÏó£¬Arguments ¶ÔÏóÊǺ¯ÊýµÄʵ¼Ê²ÎÊý¡£ËùÓÐÓà var Óï¾äÉùÃ÷µÄ±¾µØ±äÁ¿Ò²±»¶¨ÒåÔÚÕâ¸öµ÷ÓöÔÏóÀï¡£Õâ¸öʱºò£¬µ÷ÓöÔÏó´¦ÔÚ×÷ÓÃÓòÁ´µÄÍ·²¿£¬±¾µØ±äÁ¿¡¢º¯ÊýÐÎʽ²ÎÊýºÍ Arguments ¶ÔÏóÈ«²¿¶¼ÔÚÕâ¸öº¯ÊýµÄ·¶Î§ÀïÁË¡£µ±È»£¬Õâ¸öʱºò±¾µØ±äÁ¿¡¢º¯ÊýÐÎʽ²ÎÊýºÍ Arguments ¶ÔÏó¾Í¸²¸ÇÁË×÷ÓÃÓòÁ´ÀïͬÃûµÄÊ


Ïà¹ØÎĵµ£º

javascript»ñÈ¡·þÎñ¶Ë¿Ø¼þÖµµÄÁ½ÖÖ°ì·¨

µÚÒ»ÖÖ:
+Õ¹¿ª
-HTML
<html> 
<head> 
</head> 
<body> 
<form name="form1"> 
<input type="text" name="getinfo" value="http://www.shuwo.net" size="40"><button onclick="alert(document.form1.getinfo.value ......

JavaScript ÅжÏÉÏ´«ÎļþÀàÐÍ

function
 Check_FileType(str)
{
 
var
 pos 
=
 str.lastIndexOf(
"
.
"
);
 
var
 lastname 
=
 str.substring(pos,str.length)  //´Ë´¦Îļþºó׺ÃûÒ²¿ÉÓÃÊý×鷽ʽ»ñµÃstr.split(".")
 
if
 (lastname.toLowe ......

LuaÓëjavascriptµÄ²îÒì


LuaÓëjavascriptµÄ²îÒì - [luaѧϰ]
 
תÔØ
http://huazjxy.blogbus.com/logs/60132016.html
LuaÄ£ÄâÆ÷js·½°¸
1.Óï·¨¼¶Ä£Äâ
luaÓëjsÓïÑÔ²îÒì
1.1×¢ÊÍ
js Ϊ//,luaΪ--.
1.2±äÁ¿
jsÀûÓÃvalÀ´ÉùÃ÷È«¾Ö±äÁ¿²»´æÔÚ¾Ö²¿±äÁ¿£¬luaÔò²»ÐèÒªÖ±½Ó¶¨Î»ÔòΪȫ¾Ö±äÁ¿£¬localÉùÃ÷ÔòΪ¾Ö²¿±äÁ¿¡£
1.3ÔËËã·û
js
+ - ......

javascriptÖÐevent.keycode

javascriptÖÐevent.keycode
 keycode 8 = BackSpace BackSpace
keycode 9 = Tab Tab
keycode 12 = Clear
keycode 13 = Enter
keycode 16 = Shift_L
keycode 17 = Control_L
keycode 18 = Alt_L
keycode 19 = Pause
keycode 20 = Caps_Lock
keycode 27 = Escape Escape
keycode 32 = space space ......

Javascriptµ¼³öExcel

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ