IT Help Desk > IT Forum
Disable Copy and paste from your Blog Side
ashiqbest012:
Thinking of way to make it more difficult for people to copy the contents of your Blog? Here's a neat little JavaScript that will disable copy and paste
1 <!-- Disable Copy and Paste-->
2 <script language='JavaScript1.2'>
3 function disableselect(e){
4 return false
5 }
6 function reEnable(){
7 return true
8 }
9 document.onselectstart=new Function ("return false")
10 if (window.sidebar){
11 document.onmousedown=disableselect
12 document.onclick=reEnable
13 }
14 </script>
--------------------------------------------------------------------------------------------------------------------------------------
1 Insert the code between the <head> and </head> tag.
kazi shahin:
Very learn-able code. Often we can't copy from some web page. Today I learn the code. Thank you Mr Ashiq.
ashiqbest012:
You are most welcome. I want to develop a webpage. Can you help me Mr. Shahin and Sony?
nasir760:
its very helpful
kazi shahin:
Of course. You always welcome & I'll try best of knowledge. Let's start a conversation in the forum. You may visit the page
"Web based Developer Forum" in DIU forum.
At first start from HTML.
Navigation
[0] Message Index
[#] Next page
Go to full version