Ò׽ؽØͼÈí¼þ¡¢µ¥Îļþ¡¢Ãâ°²×°¡¢´¿ÂÌÉ«¡¢½ö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=document.all.img1.offsetTop
l=document.all.img1.offsetLeft
while a.tagName <>"BODY"
set a = a.offsetParent
t=t+a.offsetTop
l=l+a.offsetLeft
wend
msgbox "top="&t&chr(13)&"left="&l,64,"µÃµ½¿Ø¼þµÄλÖÃ"
end function
--> </script>
14. ¹â±êÊÇÍ£ÔÚÎı¾¿òÎÄ×ÖµÄ×îºó
<script language="javascript">
function cc()
{


Ïà¹ØÎĵµ£º

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

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

javascript ÖеÄwindow.open()º¯ÊýÓ÷¨

javascript ÖеÄwindow.open()º¯ÊýÓ÷¨
¾­³£ÉÏÍøµÄÅóÓÑ¿ÉÄܻᵽ¹ýÕâÑùһЩÍøÕ¾£¬Ò»½øÈëÊ×Ò³Á¢¿Ì»áµ¯³öÒ»¸ö´°¿Ú£¬
»òÕß°´Ò»¸öÁ¬½Ó»ò°´Å¥µ¯³ö£¬Í¨³£ÔÚÕâ¸ö´°¿ÚÀï»áÏÔʾһЩעÒâÊÂÏî¡¢°æȨÐÅÏ¢
¡¢¾¯¸æ¡¢»¶Ó­¹â¹ËÖ®ÀàµÄ»°»òÕß×÷ÕßÏëÒªÌرðÌáʾµÄÐÅÏ¢¡£ÆäʵÖÆ×÷ÕâÑùµÄÒ³Ãæ
Ч¹û·Ç³£µÄÈÝÒ×£¬Ö»ÒªÍù¸ÃÒ³ÃæµÄHTMLÀï¼ÓÈ뼸¶ÎJ ......

javascript Ìæ»»¿Õ¸ñ

 1.×Ôhttp://jorkin.reallydo.com/article.asp?id=275
µÚÒ»´Î·¢ÏÖJavaScriptÖÐreplace() ·½·¨Èç¹ûÖ±½ÓÓÃstr.replace("-","!") Ö»»áÌæ»»µÚÒ»¸öÆ¥ÅäµÄ×Ö·û.
¶østr.replace(/\-/g,"!")Ôò¿ÉÒÔÈ«²¿Ìæ»»µôÆ¥ÅäµÄ×Ö·û(gΪȫ¾Ö±êÖ¾)¡£
replace()
The replace() method returns the string that results when you replac ......

JavaScript eval() º¯Êý

 JavaScript eval() º¯Êý
¶¨ÒåºÍÓ÷¨
eval() º¯Êý¿É¼ÆËãij¸ö×Ö·û´®£¬²¢Ö´ÐÐÆäÖÐµÄµÄ JavaScript ´úÂë¡£
Óï·¨
eval(string)
²ÎÊýÃèÊö
string
±ØÐè¡£Òª¼ÆËãµÄ×Ö·û´®£¬ÆäÖк¬ÓÐÒª¼ÆËãµÄ JavaScript ±í´ïʽ»òÒªÖ´ÐеÄÓï¾ä¡£
·µ»ØÖµ
ͨ¹ý¼ÆËã string µÃµ½µÄÖµ£¨Èç¹ûÓеĻ°£©¡£
˵Ã÷
¸Ã·½·¨Ö»½ÓÊÜԭʼ×Ö·û´®×÷Ϊ² ......

JavaScriptÓï·¨¼¯½õ£¨¶þ£©

function function xx(){...} ¶¨Ò庯Êý
isNumeric                   ÅжÏÊÇ·ñÊÇÊý×Ö
innerHTML xx=¶ÔÏó.innerHTML ÊäÈëij¶ÔÏó±êÇ©ÖеÄhtmlÔ´´úÂë
innerText divid.innerText=xx ½«ÒÔdiv¶¨Î»ÒÔidÃüÃûµÄ¶ÔÏóÖµÉèΪXX
locati ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ