Sponsored Link

GCS1

Monday, November 17, 2014

How to protect particular section of a webpage

Know how to protect particular section of a webpage by preventing right click

Advertisements





Earlier we wrote about CSS codes to tune up your blog site or How to show your page title before site name in blogger or our entire Blogging Tips and Tricks

This time we are going to tell you how to copy protect some area of a webpage in your website. Sometimes we require not to allow viewers copy some section of a page. This is very much required to prevent viewers abuse post content. There is a simple method to protect such important information to get copied by unwanted followers. Here is how to do:

First you need to put the entire section you want to protect by using DIV tag. Close the entire section under DIV tag.

Next: Add little inline javascript after open <DIV> tag "oncontextmenu='return false;'" to it.
now your DIV tag should look like
<DIV oncontextmenu='return false;'>
Note: If you wish to copy protect web page content for the entire page you need to add the above java script element in body tag.

Just use this <body oncontextmenu='return false;'>

You might be interested to read:

Track your visitors activity with statcounter
or
How to setup automatic subscription for your YouTube Channel
or
Google Analystics Tools For Beginners


Advertisements:
   

No comments:

Post a Comment

Note: Only a member of this blog may post a comment.

Sponsored Link Best Web Hosting Service Provider | SusantaOnline
Author