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

[¶ÁÊé±Ê¼Ç][JavaScript¸ß¼¶³ÌÐòÉè¼Æ]

µÚ¶þÕ£ºECMAScript»ù´¡
1.µ±º¯ÊýÎÞÃ÷È··µ»Øֵʱ£¬·µ»ØµÄÒ²ÊÇÖµundefined
  function testFunc(){}
  alert(testFunc()==undefined);
2.typeof(null)=='object' //true,null¿ÉÒÔ½âÊÍΪ¶ÔÏóռλ·û
3.undefined ÊÇÉùÃ÷Á˱äÁ¿µ«Î´¶ÔÆä³õʼ»¯Ê±¸³Óè¸Ã±äÁ¿µÄÖµ£¬nullÔòÓÃÓÚ±íʾÉÐδ´æÔڵĶÔÏó¡£
  alert(null==undefined);//true£¬ÒòΪundefinedÊÇ´ÓÖµnullÅÉÉúÀ´µÄ
4.var num=3.12e3//3.12*10*10*10
  var num=3.12-e3//0.00312
5.¹ØÓÚjs±Õ°ü£¬¼òµ¥½âÊÍÊǺ¯Êýµ÷Óú¯ÊýÒÔÍâ±äÁ¿µÄÏÖÏó¡£
  var baseNum = 10;
  function addNumber(num1,num2){
      function doAddition(){
          return num1+num2+baseNum;//ÕâÀïµÄnum1¡¢num2¡¢baseNum±äÁ¿¶¼ÊÇ´Óº¯ÊýdoAdditionÍⲿ»ñÈ¡µÄ¡£
      }
      return doAddition();
  }
µÚÈýÕ£º¶ÔÏó»ù´¡
1.ECMA°Ñ¶ÔÏó(object)¶¨ÒåΪ“ÊôÐÔµÄÎÞÐò¼¯ºÏ£¬Ã¿¸öÊôÐÔ´æ·ÅÒ»¸öԭʼֵ¡¢¶ÔÏó»òº¯Êý”£¬»òÕß˵¶ÔÏóÊÇÎÞÌض¨Ë³ÐòµÄÖµµÄÊý×é¡£
2.¶ÔÏó¶¨Òå´æ·ÅÔÚ¹¹Ô캯ÊýÖС£
3.¶ÔÏóµÄ¹¹³É
  ¶ÔÏóÓÉÌØÐÔ(attribute)¹¹³É£¬ÌØÐÔ¿ÉÒÔÊÇԭʼֵ£¬Ò²¿ÉÒÔÊÇÒýÓÃÖµ¡£Èç¹ûÌØÐÔ´æ·ÅµÄÊǺ¯Êý£¬ÔòËü½«±»¿´×÷ÊǶÔÏóµÄ·½·¨(method)£¬·ñÔò¸ÃÌØÐÔ±»¿´×÷ÊôÐÔ(propert).
4.¶ÔÏóµÄ·Ï³ý
  var obj={};
  obj=null
×¢£º±ØÐ뽫ËùÓжÔÏóÒýÓÃÈ«²¿¸³ÖµÎªnull£¬²ÅÄÜÕæÕý½«¸Ã¶ÔÏó·Ï³ý¡£
5.Array¶ÔÏó³£Ó÷½·¨
var arr=[1,2,'string'];
·½·¨Ãû
²ÎÊý
·µ»ØÖµ
¹¦ÄÜ
concat
4,'hello'
[1,2,'string',4,'hello']
½«4¡¢'hello'¼ÓÈëÊý×é
slice
1,3
[2,3]
·µ»ØµÚ2ÏîÖÁµÚ4ÏîµÄÐÂÊý×飬²»°üÀ¨µÚ4ÏîÊý×é
push
{num:1}
[1,2,'string',{num:1}]
ѹÈëÐÂÏԭÊý×鳤¶È¼Ó1
pop
 
arr[length-1]
µ¯³ö×îÐÂÏԭÊý×鳤¶È¼õ1
shift
 
arr[0]
ɾ³ýÊý×éµÚÒ»Ï½«Æä×÷Ϊº¯ÊýÖµ
·µ»Ø
unshift
'black'
['black',1,2,'string']
½«blackÉèΪÊý×éµÚÒ»ÏÆäËûÏîÏòºóÒÆһλ
slice·½·¨£º
6.


Ïà¹ØÎĵµ£º

ͨ¹ýjavascript»ñµÃurl²ÎÊý

Ò³ÃæÌá½»Êý¾ÝÒ»°ãÓÐÁ½ÖÖ·½·¨£ºget,post¡£post¾ÍÊÇËùνµÄformÌá½»£¬Ê¹ÓÃÊÓͼ£»getÊÇͨ¹ýurlÌá½»¡£
Get·½·¨Ò»°ãÓúǫ́´úÂ루Èçasp,asp.net£©»ñµÃ²ÎÊý£¬´úÂëºÜ¼òµ¥£ºRequest.QueryString["id"];¼´¿É»ñÈ¡¡£ 
ÓÐЩʱºòÐèÒªÖ±½ÓÔÚǰ̨»ñÈ¡url²ÎÊý£¬ÒªÓõ½javascript£¬jsûÓÐÖ±½Ó»ñÈ¡url²ÎÊýµÄ·½·¨£¬ÄÇô£¬ÎÒÃÇÈçºÎͨ¹ýjs ......

JavaScript ÖеÄÄÚ´æй©ÎÊÌâ

ÓÉÓÚ×î½ü×Ô¼ºµÄFireFox¾­³£³öÏÖµ÷ÓÃJS½Å±¾Ê±Ôì³ÉÄÚ´æÒç³ö¶ø²úÉú¼ÙËÀµÄÏÖÏ󣬽ñÌì¸ÕºÃÓÐÐÒ¿´µÄIBMÍøÕ¾ÀïÕâƪÎÄÕ£¬¶ø×Ô¼ºÏÖÔÚÓÖÔÚѧϰJS£¬¿´ÁËÒÔºó¾õµÃдµÄ·Ç³£²»´í£¬Ìáµ½Á˺ܶàÎÒÃÇƽʱÔÚ±àдJS´úÂëʱÈÝÒ×Ôì³ÉµÄ´íÎó¡£ÏÖ½«´ËÎÄ·ÖÏí¸ø´ó¼Ò£¡
Internet Explorer ºÍ Mozilla Firefox ÊÇÁ½¸öÓë JavaScript ÖеÄÄÚ´æй©ÁªÏµ×îÎ ......

ÓÃJavaScriptÀ´ÊµÏÖһЩ¼òµ¥µÄ¿Ø¼þÑéÖ¤

Ò³ÃæÒ»£º
<html>
 <head>
  <title> ÑéÖ¤ÓëÌá½»Ò» </title>
   <script>
    function focusSelect(ID)   //µ±ÑéÖ¤²»ÄÜͨ¹ýʱ»ñµÃÑéÖ¤¿Ø¼þµÄ½¹µãºÍÄÚÈÝ
 {
        document.getElementById(I ......

JavascriptÃæÏò¶ÔÏó±à³Ì£¨Èý£©£º·Çº¯Êý¶ÔÏóµÄ¼Ì³Ð


×òÌ죬ÎÒ±¾À´´òË㣬°ÑÕâ¸ö»°Ìâ½áÊøÁË¡£
µ«ÊÇ£¬Ð´µ½Ò»°ëµÄʱºò£¬ÎÒͻȻÒâʶµ½£¬JavascriptµÄ¼Ì³ÐÓÐÁ½ÖÖ¡£Ò»ÖÖÊÇ»ùÓÚ"º¯Êý¶ÔÏó"µÄ¼Ì³Ð£¬Ò²¾ÍÊÇÒ»¸öfunctionÈ¥¼Ì³ÐÁíÍâÒ»¸öfunction£¬Õâ¸öÎÒÒѾ­ÔÚ×òÌì½éÉܹýÁË¡£
ÁíÒ»ÖÖÔòÊÇ»ùÓÚ"·Çº¯Êý¶ÔÏó"µÄ¼Ì³Ð£¬²»Éæ¼°function¡£ËüµÄ×ö·¨ÓëÇ°Ò»ÖÖÇé¿öÍêÈ«²»Í¬¡£
Ò»¡¢Ê²Ã´ÊÇ"·Çº¯Êý¶ÔÏ ......

JavaScriptµÄBASE64

**
* ÎÒÔÚÍøÉÏ¿´µ½¹ýºÜ¶àBASE64µÄJavaScriptËã·¨£¬¶¼¾õµÃ²»ÂúÒ⣬ÓÚÊÇ×Ô¼ºÐ´ÁËÒ»¸ö£¬ÔÚÕâÀï·ÖÏíһϡ£
* ÎҵĴúÂëÔÚÖÊÁ¿µÄЧÂʶ¼½Ï¸ß£¬Ã»ÓÐһЩÈßÓàµÄ²Ù×÷¡£×ÜÌåÀ´½²ÎÒ¾õµÃ·Ç³£²»´í¡£
* Èç¹û´ó¼ÒÓÐʲô²»¶®µÄµØ·½¿ÉÒÔÎÊÎÒ¡£
*/
var BASE64={
    /**
     * ´Ë±äÁ¿Îª±àÂëµÄ ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ