實現目標:不可復制頁面內容
js:
<script language="javascript"> if (typeof(document.onselectstart) != "undefined") { // IE下禁止元素被選取 document.onselectstart = function (event){if(event.target.tagName!="INPUT"){return false;}} } else {// firefox下禁止元素被選取的變通辦法 document.onmousedown = function (event){if(event.target.tagName!="INPUT"){return false;}} document.onmouseup = function(event){if(event.target.tagName!="INPUT"){return false;}} }</script>
html:
<body ng-class="{'overflow-hide': !bodyOverFlowIsAuto}" ng-controller="OuterController" oncontextmenu="return false"><div ui-view="" class="h100"></div> </body>
?
?
作者:smile.轉角
QQ:493177502
?