ѧϰ¡¶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(
Ïà¹ØÎĵµ£º
£¨1£©ÏÂÔØClientInfo.dll£¨ÔÚÎÒµÄ×ÊÔ´ÖпÉÒÔÏÂÔØhttp://download.csdn.net/source/2141582£©
£¨2£©Ê¹ÓÃnew ActiveXObject("ClientInfo.HostInfo")µ÷ÓÃActiveX¿â
£¨3£©GetAdapterMac(0)»ñÈ¡Íø¿¨MACµØÖ·
ʹÓÃʾÀý£º
<HTML>
<TITLE>ClientInfoX JavaScript Sample</TITLE>
<HEAD>
<script l ......
³ö´¦£ºhttp://www.jcwcn.com/article/2005/1210/javascript_17476.html
<HTML>
<HEAD>
<title>WEBÒ³Ãæµ¼³öΪEXCELÎĵµµÄ·½·¨
</title>
</HEAD>
<body>
<BR>
<table id = "PrintA" width="100%" border="1" cell ......
±¾ÎÄת×Ô£ºhttp://www.felixwoo.com/archives/247
×î½üÔÚÍøÉϲéÔÄÁ˲»ÉÙJavascript±Õ°ü(closure)Ïà¹ØµÄ×ÊÁÏ£¬Ð´µÄ´ó¶àÊǷdz£µÄѧÊõºÍרҵ¡£¶ÔÓÚ³õѧÕßÀ´Ëµ±ð˵Àí½â±Õ°üÁË£¬¾ÍÁ¬ÎÄ×ÖÐðÊö¶¼ºÜÄÑ¿´¶®¡£×«Ð´´ËÎĵÄÄ¿µÄ¾ÍÊÇÓÃ×îͨË×µÄÎÄ×Ö½Ò¿ªJavascript±Õ°üµÄÕæʵÃæÄ¿¡£
Ò»¡¢Ê²Ã´ÊDZհü£¿
“¹Ù·½”µÄ½âÊÍÊÇ£º±Õ°üÊ ......
CDATA ÄÚ²¿µÄËùÓж«Î÷¶¼»á±»½âÎöÆ÷ºöÂÔ¡£
¼ÙÈçÎı¾Öаüº¬ÁË´óÁ¿µÄ "<" ºÍ "&" ×Ö·û - ¾ÍÏñ±à³Ì´úÂëÖо³£³öÏÖµÄÇé¿öÒ»Ñù - ÄÇôÕâ¸ö XML ÔªËؾͿÉÒÔ±»¶¨ÒåΪһ¸ö CDATA ²¿·Ö¡£
CDATA Çø¶Î¿ªÊ¼ÓÚ "<![CDATA["£¬½áÊøÓÚ "]]>"£º
<script type="text/javascript">
<![CDATA[
function compare(a,b ......
1. oncontextmenu="window.event.returnValue=false" ½«³¹µ×ÆÁ±ÎÊó±êÓÒ¼ü
<table border oncontextmenu=return(false)><td>no</table> ¿ÉÓÃÓÚTable
2. <body onselectstart="return false"> È¡ÏûÑ¡È¡¡¢·ÀÖ¹¸´ÖÆ
3. onpaste="return false" ²»×¼Õ³Ìù
4. oncopy="return false;" oncut= ......