
We protect a content of a site
If on your site the photo of liked cat Murzika is laid out, but you do not want, that someone copied her or saved on a hard put such script in a body of a site:
<script language=javascript>
function click () {
if (event.button == 2) {
alert (' my cat! Not to whom I shall not give! =) ');
}
}
document.onmousedown=click
//->
</script>
However to copy it is possible if to allocate all and to press ctrl+c (view-> copy). Here is how it can be disconnected:
<html>
<head>
...
<script>
function no_copy ()
{
alert (" All the same I shall not give! ")
return false
}
</script>
...
</head>
<body oncopy = " return no_copy () ">
...
</body>
</html>
Also it can be realized with the help of such code:
<html>
<head>
<title> Murzik </title>
<style> </style>
</head>
<body oncopy = " return false " onselectstart = " return false ">
</body>
</html>
But if you on other party of barricades. Someone has placed a photo of the dog the Dingo, and she so is pleasant to you, that in online already money no to look =) and it is necessary to download urgently her on a hard, we press ” to show as html “ then we find the direct address on a picture is copied it in a line of a browser and vualja! For the text we search in the same place.