, , :
1 - :
<script src="js/jquery.min.js" type="text/javascript"></script>
<script type="text/javascript" language="javascript">
$(function () {
$(this).bind("contextmenu", function (e) {
e.preventDefault();
alert("Copy is not allowed");
});
});
</script>
2-disable Selection
<script type="text/javascript">
function disableSelection(target) {
if (typeof target.onselectstart != "undefined")
target.onselectstart = function () { return false }
else if (typeof target.style.MozUserSelect != "undefined")
target.style.MozUserSelect = "none"
else
target.onmousedown = function () { return false }
target.style.cursor = "default"
}
var alltables = document.getElementsByTagName ("table") for (var i = 0; i <alltables.length; i ++) disableSelection (alltables [i]) // disable text selection in all tables on the page
3rd added those to the end of the body tag
<script type="text/javascript">
var somediv = document.getElementById("page-wrap")
disableSelection(somediv)
</script>
<script type="text/javascript">
disableSelection(document.body)
</script>
now everything is done .....
Thanks guys, it was very helpful.
source
share