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

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;" oncut="return false;" ·ÀÖ¹¸´ÖÆ

5. <link rel="Shortcut Icon" href="favicon.ico"> IEµØÖ·À¸Ç°»»³É×Ô¼ºµÄͼ±ê

6. <link rel="Bookmark" href="favicon.ico"> ¿ÉÒÔÔÚÊղؼÐÖÐÏÔʾ³öÄãµÄͼ±ê


7. <input style="ime-mode:disabled"> ¹Ø±ÕÊäÈë·¨


8. ÓÀÔ¶¶¼»á´ø×Å¿ò¼Ü
<script language="JavaScript"> <!--
if (window == top)top.location.href = "frames.htm"; //frames.htmΪ¿ò¼ÜÍøÒ³
// --> </script>


9. ·ÀÖ¹±»ÈËframe
<SCRIPT LANGUAGE=JAVASCRIPT> <!--
if (top.location != self.location)top.location=self.location;
// --> </SCRIPT>


10. ÍøÒ³½«²»Äܱ»Áí´æΪ
<noscript> <*** src="/*.html>"; </***> </noscript>


11. <input type=button value="/²é¿´ÍøÒ³Ô´´úÂë
onclick="window.location = "view-source:"+ "http://www.pconline.com.cn"">
12.ɾ³ýʱȷÈÏ
<a href=""javascript :if(confirm("ȷʵҪɾ³ýÂð?"))location="boos.asp?&areyou=ɾ³ý&page=1"">ɾ³ý </a>


13. È¡µÃ¿Ø¼þµÄ¾ø¶ÔλÖÃ
//Javascript
<script language="Javascript">
function getIE(e){
var t=e.offsetTop;
var l=e.offsetLeft;
while(e=e.offsetParent){
t+=e.offsetTop;
l+=e.offsetLeft;
}
alert("top="+t+"/nleft="+l);
}
</script>
//VBScript
<script language="VBScript"> <!--
function getIE()
dim t,l,a,b
set a=document.all.img1
t=do


Ïà¹ØÎĵµ£º

JavaScript »ñÈ¡¶ÔÏóµÄ¸ß¶ÈºÍ¿í¶ÈÏêϸ˵Ã÷

scrollHeight: »ñÈ¡¶ÔÏóµÄ¹ö¶¯¸ß¶È¡£
scrollLeft:ÉèÖûò»ñȡλÓÚ¶ÔÏó×ó±ß½çºÍ´°¿ÚÖÐÄ¿Ç°¿É¼ûÄÚÈݵÄ×î×ó¶ËÖ®¼äµÄ¾àÀë
scrollTop:ÉèÖûò»ñȡλÓÚ¶ÔÏó×¶ËºÍ´°¿ÚÖпɼûÄÚÈݵÄ×¶ËÖ®¼äµÄ¾àÀë
scrollWidth:»ñÈ¡¶ÔÏóµÄ¹ö¶¯¿í¶È
offsetHeight:»ñÈ¡¶ÔÏóÏà¶ÔÓÚ°æÃæ»òÓɸ¸×ø±ê offsetParent ÊôÐÔÖ¸¶¨µÄ¸¸×ø±êµÄ¸ß¶È
offsetL ......

JavaScriptÃæÏò¶ÔÏó³ÌÐòÉè¼Æ(7): ±Õ°ü

 ±¾²©¿ÍתÔØÓÚ£ºhttp://devbean.javaeye.com/blog/409566
±Õ°üÕâ¸ö¸ÅÄî¿´ÉÏÈ¥ºÜÉî°Â£¬Õâ¸ö´ÊÔÚÀëÉ¢ÊýѧÀïÃæµÄÒâ˼ȷʵ±È½ÏÄÑÓÚÀí½â¡£ÔÚÕâÀÎÒÃÇÏÈ¿ÉÒ԰ѱհüÀí½â³ÉÊÇÒ»ÖÖÄäÃûº¯Êý»òÕßÄäÃûÀà¡£
1. ʲôÊDZհü£¿
ʲôÊDZհü£¿Ò»ÖÖÕýʽµÄ½âÊÍÊÇ£ºËùν±Õ°ü£¬Ö¸µÄÊÇÒ»ÖÖÓµÓкܶà±äÁ¿²¢ÇÒ°ó¶¨ÁËÕâЩ±äÁ¿µÄ»·¾³µÄ±í´ïÊ ......

javascriptÖÐparseIntº¯Êý

×¢£ºÔÚÏîÄ¿ÖÐÓöµ½ÀàËƵÄÎÊÌ⣬ͨ¹ýÍøÂç½â¾öÎÊÌâ¡£
parseInt("07") ·µ»Ø¶àÉÙ ?
parseInt("08") ÓÖ·µ»Ø¶àÉÙ ?
ÕýÈ·´ð°¸£º
parseInt("07") ·µ»Ø8
parseInt("08") ·µ»Ø0
ÓÃjavascriptµÄparseIntº¯Êýʱ£¬parseInt("08")»òÕßparseInt("09")·µ»ØµÄ¾ÓÈ»ÊÇ0£¬¶øparseInt("01")...parseInt("07")¶¼ÊÇÕýÈ·µÄ¡£
ΪʲôÕâÑùÄØ£¿
......

JavaScript¿ª·¢¹¤¾ß£ºClosure Tools

ÎÄÕÂÀ´×Ô£ºhttp://www.oschina.net/p/closure
Google¿ªÔ´ÁËÆäÄÚ²¿Ê¹ÓõÄJavaScript¿ª·¢¹¤¾ß£¬Ï£Íû°ïÖúÍⲿ³ÌÐòÔ±¿ª·¢³öËٶȸü¿ìµÄWebÓ¦ÓóÌÐò¡£GoogleÈÏΪͨ¹ýÔÊÐí¿ª·¢ÕßʹÓÃGoogle×Ô¼ºËùÓõŤ¾ß£¬ËûÃDz»½ö¿ÉÒÔ´´Ôì³ö¸ü¿ìµÄ¸»WebÓ¦ÓóÌÐò£¬¶øÇÒÄÜÕæÕýÈÃWeb²åÉϳá°ò¡£Closure JavaScript±àÒëÆ÷ºÍ¿âÔø±»GoogleÓÃÓÚ¿ª·¢Gmail ......

JavaScriptÓï·¨¼¯½õ


click()    ¶ÔÏó.click()    ʹ¶ÔÏó±»µã»÷¡£
closed    ¶ÔÏó.closed    ¶ÔÏó´°¿ÚÊÇ·ñÒѹرÕtrue/false
clearTimeout(¶ÔÏó) Çå³ýÒÑÉèÖõÄsetTimeout¶ÔÏó
clearInterval(¶ÔÏó) Çå³ýÒÑÉèÖõÄsetInterval¶ÔÏó
confirm("ÌáʾÐÅÏ¢") µ¯³öÈ·ÈÏ¿ò£¬È· ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ