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

javascript typeofµÄÓ÷¨

¾­³£»áÔÚjsÀïÓõ½Êý×é,±ÈÈç ¶à¸öÃû×ÖÏàͬµÄinput, ÈôÊǶ¯Ì¬Éú³ÉµÄ, Ìύʱ¾ÍÐèÒªÅжÏÆäÊÇ·ñÊÇÊý×é.
if(document.mylist.length != "undefined" ) {} Õâ¸öÓ÷¨ÓÐÎó.
ÕýÈ·µÄÊÇ if( typeof(document.mylist.length) != "undefined" ) {}
»ò if( !isNaN(document.mylist.length) ) {}
typeofµÄÔËËãÊý䶨Òå,·µ»ØµÄ¾ÍÊÇ "undefined".
ÔËËãÊýΪÊý×Ö typeof(x) = "number"
×Ö·û´® typeof(x) = "string"
²¼¶ûÖµ typeof(x) = "boolean"
¶ÔÏó,Êý×éºÍnull typeof(x) = "object"
º¯Êý typeof(x) = "function"
typeof ÔËËã·û·µ»ØÒ»¸öÓÃÀ´±íʾ±í´ïʽµÄÊý¾ÝÀàÐ͵Ä×Ö·û´®¡£
¿ÉÄܵÄ×Ö·û´®ÓУº"number"¡¢"string"¡¢"boolean"¡¢"object"¡¢"function" ºÍ "undefined"¡£
È磺
alert(typeof (123));//typeof(123)·µ»Ø"number"
alert(typeof ("123"));//typeof("123")·µ»Ø"string"
typeof ÔËËã·û
·µ»ØÒ»¸öÓÃÀ´±íʾ±í´ïʽµÄÊý¾ÝÀàÐ͵Ä×Ö·û´®¡£
typeof[()expression[]] ;
expression ²ÎÊýÊÇÐèÒª²éÕÒÀàÐÍÐÅÏ¢µÄÈÎÒâ±í´ïʽ¡£
˵Ã÷
typeof ÔËËã·û°ÑÀàÐÍÐÅÏ¢µ±×÷×Ö·û´®·µ»Ø¡£typeof ·µ»ØÖµÓÐÁùÖÖ¿ÉÄÜ£º "number," "string," "boolean," "object," "function," ºÍ "undefined."
typeof Óï·¨ÖеÄÔ²À¨ºÅÊÇ¿ÉÑ¡Ïî¡£


Ïà¹ØÎĵµ£º

Javascript½âÒÉ

Javascript½âÒÉ
1.        HTML¿ò¼ÜframesetµÄÓ¦ÓÃ
¿ò¼Ü±à³Ì¸ÅÊöÒ»¸öHTMLÒ³Ãæ¿ÉÒÔÓÐÒ»¸ö»ò¶à¸ö×Ó¿ò¼Ü£¬ÕâЩ×Ó¿ò¼ÜÒÔ<iframe>À´±ê¼Ç£¬ÓÃÀ´ÏÔʾһ¸ö¶ÀÁ¢µÄHTMLÒ³Ãæ¡£ÕâÀïËù½²µÄ¿ò¼Ü±à³Ì°üÀ¨¿ò¼ÜµÄ×ÔÎÒ¿ØÖÆÒÔ¼°¿ò¼ÜÖ®¼äµÄ»¥Ïà·ÃÎÊ£¬ÀýÈç´ÓÒ»¸ö¿ò¼ÜÖÐÒýÓÃÁíÒ»¸ö¿ò¼ÜÖеÄJavaScript± ......

JavascriptÖÐ×î³£ÓõÄ55¸ö¾­µä¼¼ÇÉ

 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;" onc ......

javascript±í¸ñÅÅÐò

<html>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>Power Table</title>
<style>
body{
FONT-SIZE: 9pt; PADDING-RIGHT: 0px; PADDING-LEFT: 0px; PADDING-BOTTOM: 0px; PADDING-TOP: 0px;
}
input {
FONT-SIZE: 9pt; height: 15pt; width:50px; ......

Javascript ¶¨Ê±Æ÷µ÷Óô«µÝ²ÎÊýµÄʹÓ÷½·¨(ת£©

 Javascript ¶¨Ê±Æ÷µ÷Óô«µÝ²ÎÊýµÄʹÓ÷½·¨
from:txdnet.cn, Date:2008-04-24 08:18:36.0, Hit:317
Tag:0 
Do:Êղص½IE Google baidu yahoo QQÊéÇ© mySpace ÆÀÂÛ(0) 轉爲·±體 ´ó ÖРС
ÎÞÂÛÊÇwindow.setTimeout »¹ÊÇwindow.setInterval ......

Javascript Éè¼Æģʽ

 Javascript
ÊÇÒ»¸öºÜÇ¿´óºÜÁé»îµÄÓïÑÔ£¬Äã¼È¿ÉÒÔ°ÑËüµ±×÷ÃæÏò¹ý³ÌµÄÓïÑÔ£¬Ò²¿ÉÒÔ°ÑËüµ±×÷ÃæÏò¶ÔÏóµÄÓïÑÔÀ´Óá£ÕâƪÖ÷Ҫ̽ÌÖÒ»ÏÂÈçºÎÓÃjavascriptÀ´ÊµÏÖÒ»¸ö
SingletonÀà¡£ÏàÐÅÓÐЩ±à³Ì¾­ÑéµÄÅóÓÑÃǶÔSingletonģʽ¶¼ºÜÊìϤ¡£Singleton
ģʽÖ÷ÒªÓÃÀ´ÏÞÖÆÒ»¸öÀàµÄ¶à´ÎʵÀý»¯¡£Ò»°ãÀ´ËµÏµÍ³´´½¨µÄʵÀýÔ½ÉÙ£¬Õ¼ÓÃ×ÊÔ´Ô ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ