1 屏蔽彈出窗口最大化按鈕
代碼如下:
<script language="Javascript">
<!-- script begins here by POPOEVER
function alwaysRaised() {
var newWindow = window.open("http://andrepan.topcool.net/index.html","","Height=400,Width=300,alwaysRaised");
}
//-->
</script>
2 禁止點(diǎn)擊鼠標(biāo)右鍵
<script language="javascript">
function click() {
if (event.button==2) {
alert(‘對(duì)不起,本頁(yè)的內(nèi)容不經(jīng)允許不得拷備?!?
}
}
document.onmousedown=click
</script>
3 徹底屏蔽鼠標(biāo)右鍵
oncontextmenu="window.event.returnValue=false"
<table border oncontextmenu=return(false)><td>no</table> 可用于Table
4 屏蔽ctrl+N功能
<body onkeydown=‘if(event.keyCode==78&&event.ctrlKey)return false;‘>
5 網(wǎng)頁(yè)文字不被選中
<HTML>
<body onselectstart="return false">
無(wú)憂腳本<br>無(wú)憂腳本<br>無(wú)憂腳本<br>無(wú)憂腳本<br>無(wú)憂腳本<br>無(wú)憂腳本<br>無(wú)憂腳本</body>
</html>
6 不準(zhǔn)粘貼
onpaste="return false"
7 防止復(fù)制
oncopy="return false;" oncut="return false;"
8 IE地址欄前換成自己的圖標(biāo)
<link rel="Shortcut Icon" href="favicon.ico">
9 在收藏夾中顯示出自己的圖標(biāo)
<link rel="Bookmark" href="favicon.ico">
10 關(guān)閉輸入法
<input style="ime-mode:disabled">
11 防止被人frame
<SCRIPT LANGUAGE=JAVASCRIPT><!--
if (top.location != self.location)top.location=self.location;
// --></SCRIPT>
12 防止網(wǎng)頁(yè)另存為
<html>
<noscript><iframe src=*.html></iframe></noscript>
<body >
</body>
</html>
13 屏蔽功能鍵Shift,Alt,Ctrl
<script>
function look(){
if(event.shiftKey)
alert("禁止按Shift鍵!"); //可以換成ALT CTRL
}
document.onkeydown=look;
</script>
14 網(wǎng)頁(yè)不會(huì)被緩存
<META HTTP-EQUIV="pragma" CONTENT="no-cache">
<META HTTP-EQUIV="Cache-Control" CONTENT="no-cache, must-revalidate">
<META HTTP-EQUIV="expires" CONTENT="Wed, 26 Feb 1997 08:21:57 GMT">
或者<META HTTP-EQUIV="expires" CONTENT="0">
15 不要滾動(dòng)條
讓豎條沒(méi)有:
<body style="overflow:scroll;overflow-y:hidden">
</body>
讓橫條沒(méi)有:
<body style="overflow:scroll;overflow-x:hidden">
</body>
兩個(gè)都去掉?更簡(jiǎn)單了
<body scroll="no">
</body>
16 去掉圖片鏈接點(diǎn)擊后,圖片周圍的虛線
<a href="#" onFocus="this.blur()"><img src="logo.jpg" border=0></a>
17 在頁(yè)面中如何加入不是滿鋪的背景圖片,拉動(dòng)頁(yè)面時(shí)背景圖不動(dòng)
<STYLE>
body
{background-image:url(logo.gif); background-repeat:no-repeat;
background-position:center;background-attachment: fixed}
</STYLE>
18 腳本永不出錯(cuò)
<SCRIPT LANGUAGE="JavaScript">
<!-- Hide
function killErrors() {
return true;
}
window.onerror = killErrors;
// -->
</SCRIPT>
19 屏蔽網(wǎng)頁(yè)上的所有按鍵
<html>
<head>
</head>
<body leftmargin=0 topmargin=0 oncontextmenu="return false" ondragstart="return false" onselectstart ="return false" onselect="document.selection.empty()" oncopy="document.selection.empty()" onbeforecopy="return false" onmouseup="document.selection.empty()">
</body>
</html>
聯(lián)系客服