經典javascript效果代碼

來源:互聯網
上載者:User
Code
網頁禁止儲存代碼為:
<noscript><iframe src="*.htm"></iframe></noscript>

本機ip<%=request.servervariables("remote_addr")%>
伺服器名<%=Request.ServerVariables("SERVER_NAME")%>
伺服器IP<%=Request.ServerVariables("LOCAL_ADDR")%>
伺服器連接埠<%=Request.ServerVariables("SERVER_PORT")%>

網頁禁止被緩衝的代碼 ASP
<%
Response.Expires = 0
Response.ExpiresAbsolute = Now() - 1
Response.CacheControl = "no-cache"
%>

1.將徹底屏蔽滑鼠右鍵,無右鍵菜單
<body oncontextmenu="window.event.returnvalue=false">

也可以用於網頁中Table架構中
<table border oncontextmenu=return(false)><td>no</table>

2.取消選取、防止複製
<body onselectstart="return false">

3.不準粘貼
<body onpaste="return false">

4.防止複製 
<body oncopy="return false;" oncut="return false;">

5.IE地址欄前換成自己的表徵圖
<link rel="Shortcut Icon" href="favicon.ico">

6.收藏夾中顯示出你的表徵圖
<link rel="Bookmark" href="favicon.ico">

7.關閉IME 
<input style="ime-mode:disabled">

說明:這段代碼是在表格提交時用到的。也就是在輸入資料時不可以使用其他IME模式。

8.永遠都會帶著架構

<script language="javascript"><!-- 
if (window == top)top.location.href = "frames.htm";// --></script>9.防止被人frame

<SCRIPT LANGUAGE=javascript><!-- 
if (top.location != self.location)top.location=self.location; 
// --></SCRIPT>

<input style="ime-mode:disabled">

9.查源檔案

<input type=button value=查看網頁原始碼 
onclick="window.location = 'view-source:'+ 'http://www.e3i5.com/test.htm';"> 

10.屏蔽功能鍵Shift,Alt,Ctrl
<script>
function look(){ 
if(event.shiftKey) 
alert("禁止按Shift鍵!"); //可以換成ALT CTRL

document.onkeydown=look; 
</script>

11.游標是停在文字框文字的最後
<script language="java script">
function cc()
{
var e = event.srcElement;
var r =e.createTextRange();
r.moveStart("character",e.value.length);
r.collapse(true);
r.select();
}
</script>
<input type=text name=text1 value="123" onfocus="cc()">

 

 

轉載自:http://www.cnblogs.com/ZHF/articles/1407045.html

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.