A
A
Ababix2015-09-28 14:52:27
JavaScript
Ababix, 2015-09-28 14:52:27

The code which forbids to look at the code of an element on a web page?

Code that prohibits viewing the code of an element on a web page

Answer the question

In order to leave comments, you need to log in

3 answer(s)
O
Optimus, 2015-09-28
@Ababix

You can only disable the right mouse button, but you can still download the entire page.
Forget it. The page code is not protected.

V
Vitaly Inchin ☢, 2015-09-28
@In4in

Code that prohibits viewing the code of an element on a web page

Where?
Well, maybe I said it incorrectly, but I need a code that, when the right mouse button is pressed, a message pops up
something like that

document.oncontextmenu = function(e){ 
  e.preventDefault();
  alert("А нельзя"); 
}

M
Mikhail Osher, 2015-09-28
@miraage

You are trying to "protect" HTML "code". It's impossible.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question