javascript¼üÅ̼üÂëÖµ±í
keycode 0 =
keycode 1 =
keycode 2 =
keycode 3 =
keycode 4 =
keycode 5 =
keycode 6 =
keycode 7 =
keycode 8 = BackSpace BackSpace
keycode 9 = Tab Tab
keycode 10 =
keycode 11 =
keycode 12 = Clear
keycode 13 = Enter
keycode 14 =
keycode 15 =
keycode 16 = Shift_L
keycode 17 = Control_L
keycode 18 = Alt_L
keycode 19 = Pause
keycode 20 = Caps_Lock
keycode 21 =
keycode 22 =
keycode 23 =
keycode 24 =
keycode 25 =
keycode 26 =
keycode 27 = Escape Escape
keycode 28 =
keycode 29 =
keycode 30 =
keycode 31 =
keycode 32 = space space
keycode 33 = Prior
keycode 34 = Next
keycode 35 = End
keycode 36 = Home
keycode 37 = Left
keycode 38 = Up
keycode 39 = Right
keycode 40 = Down
keycode 41 = Select
keycode 42 = Print
keycode 43 = Execute
keycode 44 =
keycode 45 = Insert
Ïà¹ØÎĵµ£º
<html>
<head>
<title></title>
</head>
<body>
<form id=aa name=aa>
<input type=button value="ͬÒâ(10)" id=a1 disabled="disabled">
</form>
</body>
</html>
<script>
var num=10;
window.setTimeout("aa()",1000);
function ......
±Õ°ü£¨closure£©ÊÇJavascriptÓïÑÔµÄÒ»¸öÄѵ㣬ҲÊÇËüµÄÌØÉ«£¬ºÜ¶à¸ß¼¶Ó¦Óö¼ÒªÒÀ¿¿±Õ°üʵÏÖ¡£
ÏÂÃæ¾ÍÊÇÎÒµÄѧϰ±Ê¼Ç£¬¶ÔÓÚJavascript³õѧÕßÓ¦¸ÃÊǺÜÓÐÓõġ£
Ò»¡¢±äÁ¿µÄ×÷ÓÃÓò
ÒªÀí½â±Õ°ü£¬Ê×ÏȱØÐëÀí½âJavascriptÌØÊâµÄ±äÁ¿×÷ÓÃÓò¡£
±äÁ¿µÄ×÷ÓÃÓòÎ޷ǾÍÊÇÁ½ÖÖ£ºÈ«¾Ö±äÁ¿ºÍ¾Ö²¿±äÁ¿¡£
JavascriptÓïÑÔµÄÌØÊâÖ®´¦£¬¾ÍÔÚÓ ......
¼ÙÉè obj Ϊij¸ö HTML ¿Ø¼þ¡£
obj.offsetTop Ö¸ obj ¾àÀëÉÏ·½»òÉϲã¿Ø¼þµÄλÖã¬ÕûÐÍ£¬µ¥Î»ÏñËØ¡£
obj.offsetLeft Ö¸ obj ¾àÀë×ó·½»òÉϲã¿Ø¼þµÄλÖã¬ÕûÐÍ£¬µ¥Î»ÏñËØ¡£
obj.offsetWidth Ö¸ obj ¿Ø¼þ×ÔÉíµÄ¿í¶È£¬ÕûÐÍ£¬µ¥Î»ÏñËØ¡£
obj.offsetHeight Ö¸ obj ¿Ø¼þ×ÔÉíµÄ¸ß¶È£¬ÕûÐÍ£¬µ¥Î»ÏñËØ¡£
ÎÒÃǶÔÇ°ÃæÌáµ½µÄ“ ......
¼Ì³Ð»úÖÆ£¬Ëµµ½¼Ì³Ð£¬¾ÍÒªÏëµ½´Ó»ùÀ࿪ʼ£¬µ«ÊÇJavaScriptÖеÄÀàÓÐÁ½´óÀࣺһ£¬ÄÚǶµÄ£»¶þ£¬Óû§×Ô¶¨Ò壻һ°ãÇ°Õß²»»á±»ÓÃÀ´×ö»ùÀ࣬ÔÒòÊÇΪÁ˱£ÕÏjsµÄ°²È«¡£µ«ÊÇÎÒÃÇ¿ÉÒÔͨ¹ýprototypeÀ´¶Ô»ùÀà½øÐÐÀ©³ä£¬Ôö¼ÓÎÒÃÇÏëÒªµÄÊôÐԺͷ½·¨¡£ÒÔÏÂÊÇ×Ô¼º¶Ô¼Ì³ÐµÄ¼¸ÖÖ·½Ê½µÄÀí½â¡£
1> ¶ÔÏó ......