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

Javascript´úÂëÊղشóÈ«


Javascript´úÂëÊղشóÈ«
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><iframe src="/*.html>";</iframe></noscript>
11. <input type=button value=²é¿´ÍøÒ³Ô´´úÂë
onclick="window.location = `view-source:` http://www.51js.com/`";>
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()
{
var e = event.srcElement;
var r =e.create


Ïà¹ØÎĵµ£º

JavaScript»ñÈ¡Ò³Ãæ¿í¶È¸ß¶È´óÈ«

ÍøÒ³¿É¼ûÇøÓò¿í£ºdocument.body.clientWidth
ÍøÒ³¿É¼ûÇøÓò¸ß£ºdocument.body.clientHeight
ÍøÒ³¿É¼ûÇøÓò¿í£ºdocument.body.offsetWidth(°üÀ¨±ßÏߵĿí)
ÍøÒ³¿É¼ûÇøÓò¸ß£ºdocument.body.offsetHeight(°üÀ¨±ßÏߵĿí)
ÍøÒ³ÕýÎÄÈ«ÎÄ¿í£ºdocument.body.scrollWidth
ÍøÒ³ÕýÎÄÈ«Îĸߣºdocument.body.scrollHeight
ÍøÒ³±»¾íÈ¥µ ......

javascript ¿çÎĵµµ÷Óü¼Êõ

ÕâÊÇÒ»ÖÖºÜÓÐǰ;µÄ¼¼Êõ£¬¿ÉϧÉú²»·êʱ£¬IE¸Õ´ò¿åÍø¾°£¬»ðºüÓÖð³öÀ´ÁË¡£ÕâÖÖ¼¼ÊõÊÇÎÒÔÚÉè¼Æ³¬¼¶Êý×é¶ÔÏóʱ·¢Ïֵġ£ÓÉÓÚÖ±½Ó¼Ì³ÐÔ­ÉúÊý×éÎÊÌâ¶à£¬ÎÒÖ»ÓÐÓÃObjectÓëArrayµÄÔ­ÐÍ·½·¨¹¹½¨Ò»¸öÐÂÀà¡£²»ÓÃ˵£¬Ð§Âʲ»Ì«ÀíÏë¡£Ö±µ½ÎÒÒѰѳ¬¼¶Êý×éÕéÖÁÍêÃÀµÄ½ñÌ죬ÎÒ»¹ÔÚ²»¶ÏÑ°ÕÒеÄÌæ´ú·½°¸£¬ÓÚÊÇÎÒ¾ÍÏëµ½ÓÃÁíÒ»¸öÎĵµµÄÊý×é¶ÔÏóÀ ......

ÔÚJavascriptÖж¯Ì¬´´½¨º¯Êý

´´½¨¶¯Ì¬º¯Êý£¨ÔÚc/c++ÖÐÀûÓú¯ÊýÖ¸ÕëÀ´ÊµÏÖ£©
  var FunctionName = new Function(argument1,...,lastargument);
  ˵Ã÷£º
  ËùÓеIJÎÊý¶¼±ØÐëÊÇ×Ö·û´®ÀàÐ͵ģ¬×îºóµÄÒ»¸ö²ÎÊý±ØÐëÊÇÕâ¸ö¶¯Ì¬º¯ÊýµÄ¹¦ÄܳÌÐò´úÂë¡£
    <script type="text/javascript"> 
 & ......

JavaScript ʼþ


WEB ±à³Ì - DHTML - ʼþ
onabort
µ±Í¼Æ¬¼ÓÔر»ÖжÏʱ´¥·¢µÄʼþ
onactivate
µ±¶ÔÏó³ÉΪ»îÐÔÔªËØʱ´¥·¢µÄʼþ
onafterprint
µ±ÍøÒ³´òÓ¡½áÊøʱ´¥·¢µÄʼþ
onafterupdate
µ±¶ÔÏóµÄÊý¾Ý±»³É¹¦ÐÞ¸ÄÖ®ºó¶ø´¥·¢µÄʼþ
onbeforeactivate
µ±¶ÔÏó½«Òª±»ÉèÖóɻԪËØ֮ǰ´¥·¢µÄʼþ
onbeforecopy
µ±ÍøÒ³±»¿½±´Ö®Ç°¶ø ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ