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

ѧϰ¡¶JavaScript¸ß¼¶³ÌÐòÉè¼Æ¡·Ñ§Ï°±Ê¼Ç£¨Ò»£©

      ½øÈëеÄÏîÄ¿×éºó£¬·¢ÏÖ×Ô¼ºµÄ¹¦Á¦²îÔ¶ÁË£¬ËûÃÇдµÄjavaScript´úÂëÎҺܶ඼¿´²»¶®£¬ÏÖÔÚÎÒ×öjavaÇ°¶Ë¿ª·¢£¬javaScriptÊǷdz£ÖØÒªµÄ£¬ÏÖÔÚÎÒ¾ö¶¨ÖØÐÂÊ°Æð¡¶JavaScript¸ß¼¶³ÌÐòÉè¼Æ¡·Ñ§Ï°£¬³ÉΪһ¸öjavaScriptÄÜÊÖ¡£
      ¿´ÍêµÚÒ»ÕÂÎÒµ½»¹ÊǸ㲻Ã÷°×DOMµÄÒâ˼¡£
      javaScriptÓÐ5ÖÖԭʼÀàÐÍ£ºUndefined¡¢Null¡¢Boolean¡¢NumberºÍString¡£
 
      Ò»¡¢typeof ÔËËã·û£º¼ì²éÒ»¸ö±äÁ¿»òÖµÊÇÉÏÃæÎåÖÖԭʼÀàÐ͵ÄÄÇÒ»ÖÖ£¬×¢ÒâNullÀàÐͺÍÓ¦ÓÃÀàÐͶ¼·µ»Ø“object”¡£
     ¶þ¡¢UndefinedÀàÐÍ£¬±íʾÒѾ­¶¨ÒåµÄ±äÁ¿£¬µ«Î´¸³Öµ¾Í»áÊä³ö“undefined”¡£
     Èý¡¢nullÀàÐÍ£¬Ò²ÊÇÖ»ÓÐÒ»¸öÖµ“null”¡£±íʾ¸ü±¾Î´¶¨ÒåµÄ±äÁ¿¡£
     ËÄ¡¢NumberÀàÐÍ£¬²»ÏójavaÄÇô½²¾¿£¬ËùÓеÄÊý×Ö¾ÍÊÇ¡¢numberÀàÐÍ¡£
     1¡¢¿ÉÒÔÓÃisNaNÅжÏÒ»¸ö±äÁ¿ÊDz»ÊÇÊý×Ö£¬ÊǾͷµ»Øfalse£¬²»ÊÇÔò·µ»Øtrue¡£
     2¡¢¿ÉÒÔÓÃ.valueOf()·½·¨»ñµÃÊý×Ö;
     3¡¢ÓÃtoFixed()·½·¨»ñµÃСÊýºó±£Áô¼¸Î»Êý£¬²ÎÊý¾ÍÊÇÒª±£ÁôµÄλÊý£»
     4¡¢toExponential()·µ»ØµÄÊÇÓÿÆѧ¼ÆÊý·¨µÄÊý×Ö£»
     5¡¢toPrecision()·µ»ØµÄÊÇ×îºÏÊʵģ¬ÓпÉÄÜÊÇÖ¸ÊýÐÎʽÓпÉÄܾÍÊÇÊý×ÖÐÎʽ£¬¿´ÄÄÖֱȽϺÏÊÊÏÔʾÕâ¸öÊý×Ö¡£
     Îå¡¢StringÀàÐÍ£¬¼´×Ö·û´®¡£
     1¡¢×ª»»³É×Ö·û´®ÓÐÁ½¸ö·½·¨ÆäÖÐÒ»¸öÊÇtoString()ÀïÃæµÄ²ÎÊýÔÚÊýÖµÐÍת»»³É×Ö·û´®ºÜÓÐÓ㬲ÎÊýÊÇ“2”±íʾת»»³É2½øÖƵÄ×Ö·û´®£¬“8”±íʾת»»³É8½øÖƵÄ×Ö·û´®¡£
         var num=10;
         alert(num.toString(2));  //Êä³öÊÇ1010
     2¡¢×ª»»³É×Ö·û´®»¹¿ÉÒÔÓÃString£¨“Ҫת»»µÄ±äÁ¿”£©£¬Õâ¸ö·½·¨²»ÄÜÓÃת»»½øÖÆ£¨¿´ÉÏÌõ£©£¬»¹ÓÐÒ»µã²»Í¬µÄÊÇת»»NullÀàÐͺÍUndefinedÀàÐͲ»»áÒý·¢´íÎó¡£
     3¡¢lengthÊôÐÔÏÔʾ´Ë×Ö·û´®µÄ×Ö·ûÊýÊǶàÉÙ£»
     4¡¢charAt()ºÍcharCodeAt(


Ïà¹ØÎĵµ£º

JavaScript³£ÓÃ

--------------------------------------------------------------------------------
<body>
<mce:script type="text/javascript"><!--
document.write("Èç¹ûÏÔʾÁËÕâ¶ÎÎÄ×Ö£¬ÄÇôÄúµÄä¯ÀÀÆ÷Ö§³Ö JavaScript£¡")
// --></mce:script>
<noscript>No JavaScript support!</noscript&g ......

Ìí¼ÓÊղؼУ¬Ö»ÔËÐÐÒ»´ÎµÄjavascript´úÂë


function get_cookie(Name)
{
var search = Name + "="
var returnvalue = "";
if (document.cookie.length > 0)
{
    var offset = document.cookie.indexOf(search)
    if (offset != -1)
    {
    &nbs ......

JavaScript¼òµ¥³£ÓôúÂë

ÓÐЩʱºòÄ㾫ͨһÃÅÓïÑÔ£¬µ«ÊǻᷢÏÖÄãÆäʵÕûÌìÔÚºÍÆäËüÓïÑÔ´ò½»µÀ£¬Ò²ÐíÄãÒÔΪÕâЩ΢²»×ãµÀ£¬²»ÖÁÓÚÓ°ÏìÄãµÄ¿ª·¢½ø¶È£¬µ«Ç¡Ç¡ÊÇÕâЩÄã²»ÖØÊӵĶ«Î÷
»áÀË·ÑÄãºÜ¶àʱ¼ä£¬ÎÒÒ»Ö±ÒÔΪÎÒÔçÔÚ¼¸ÄêÇ°¾ÍÒѾ­¾«Í¨JavaScriptÁË£¬Ö±µ½Ä¿Ç°£¬ÎÒ²ÅÔ½À´Ô½¾õµÃJavaScriptÔ¶±ÈÎÒÏëÏóµÄ¸´ÔÓºÍÇ¿´ó£¬ÎÒ
¿ªÊ¼³ç°ÝËü£¬
³Ã׎ÚÈյĿÕ϶£¬°ÑÓÐ ......

ÉîÈëÀí½âJavaScript±Õ°ü

±¾ÎÄת×Ô£ºhttp://www.felixwoo.com/archives/247
×î½üÔÚÍøÉϲéÔÄÁ˲»ÉÙJavascript±Õ°ü(closure)Ïà¹ØµÄ×ÊÁÏ£¬Ð´µÄ´ó¶àÊǷdz£µÄѧÊõºÍרҵ¡£¶ÔÓÚ³õѧÕßÀ´Ëµ±ð˵Àí½â±Õ°üÁË£¬¾ÍÁ¬ÎÄ×ÖÐðÊö¶¼ºÜÄÑ¿´¶®¡£×«Ð´´ËÎĵÄÄ¿µÄ¾ÍÊÇÓÃ×îͨË×µÄÎÄ×Ö½Ò¿ªJavascript±Õ°üµÄÕæʵÃæÄ¿¡£
Ò»¡¢Ê²Ã´ÊDZհü£¿
“¹Ù·½”µÄ½âÊÍÊÇ£º±Õ°üÊ ......

Javascript¹Ø±Õµ±Ç°´°¿Ú

Javascript¹Ø±Õµ±Ç°´°¿Ú2007-09-03 11:11Õâ¸öÌ«¼òµ¥ÁË£¬window.close()¾Í¿ÉÒÔÁË£» ²»¹ýËü»á³ö¸öÌáʾ“Äú²é¿´µÄÍøÒ³ÕýÔÚÊÔͼ¹Ø±Õ´°¿Ú¡£ÊÇ·ñ¹Ø±Õ´°¿Ú£¿”£¬Äܲ»Äܲ»³öÕâ¸öÌáʾ£¿NÄêÇ°¾ÍÓÐÈËÎʹýÎÒ£¬ÄÇʱºòÎÒ»¹ÊDzËÄñ£¬²»¹ýÎҵĻشð»¹Ëã“רҵ”¡£ºÇºÇ£» “Èç¹ûÄãµÚÒ»´Î´ò¿ªÕâ¸öÍøÒ³£¬window.close() ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ