在html页面引入js
<script type="text/javascript" src="${contextPath}js/common/preventCopy.js"></script>
document.oncontextmenu = function(){ return false; } document.onkeydown = function(){ if (event.ctrlKey && window.event.keyCode==67){ return false; } } document.body.oncopy = function (){ return false; } document.onselectstart = function(){ //return false; }