Protect Copy from Webpage

Author Topic: Protect Copy from Webpage  (Read 895 times)

Offline Narayan

  • Sr. Member
  • ****
  • Posts: 426
  • যদি তোর ডাক শুনে কেউ না আসে তবে একলা চল রে।
    • View Profile
Protect Copy from Webpage
« on: October 26, 2014, 07:42:19 PM »
Write the following Code

<script type=”text/JavaScript”>
//courtesy of hostcoding.com
function killCopy(e){
return false
}
function reEnable(){
return true
}
document.onselectstart=new Function (“return false”)
if (window.sidebar){
document.onmousedown=killCopy
document.onclick=reEnable
}
</script>


Thank you.
Narayan Ranjan Chakraborty
Assistant Professor
Department of CSE
Daffodil International University.

Offline kaushik.swe

  • Full Member
  • ***
  • Posts: 140
    • View Profile
    • Site at DIU
Re: Protect Copy from Webpage
« Reply #1 on: October 28, 2014, 03:29:28 PM »
Why cant we use this on student's exam scripts?

By the way, Thank You.
Kaushik Sarker
Associate Head & Assistant Professor
Department of Software Engineering, FSIT
Daffodil International University