转载: http://www.cnblogs.com/arix04/archive/2008/09/23/1296943.html
JavaScript禁止粘贴,禁止右键,禁止保存代码:
例子代码如下:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<head>
<title>js-test</title>
<script language="JavaScript">
<!-- 禁止右键 -->
document.oncontextmenu = function() { return false;}
</script>
</head>
<!-- 不允许保存start -->
<noscript><iframe src="*.htm"></iframe></noscript>
<!-- 不允许保存end -->
<body>
<center>
<h4>此页禁止右键,禁止保存</h4>
<hr>
允许粘贴
<br>
<input type="text">
<br>
禁止粘贴
<br>
<input type="text" οnpaste="return false">
</center>
</body>
</html>
References:
HTML <noscript> Tag : http://www.w3schools.com/tags/tag_noscript.asp