Forum

Notifications
Clear all

Where can I find an HTML code?  

deepcode
(@deepcode)
Registered

Where can I find an HTML code that blocks everything on your page...Like if someone wants to save one of your pictures or something and you want to block it...Where can I find the code? Thanks!

Quote
Topic starter Posted : 28/01/2020 6:34 am
gamezgalore
(@gamezgalore)
Registered

Do you mean disabling the right click mouse button?

ReplyQuote
Posted : 28/01/2020 8:34 am
CodeWithMike
(@codeadmin)
Admin

I assume he does! In which case you can use a simple Javascript code snipper called an event listener. Using this listener you can disable the context menu.

Although, it's generally not done as much anymore. You'll only annoy your website visitors.

document.addEventListener('contextmenu', event => event.preventDefault());


ReplyQuote
Posted : 04/02/2020 7:46 am
Share: