Hi techyv,
How to remove clipboard javascript? We as a team in our java programming class are having a problem on removing the clipboard using the javascript code. I know some of you are experts when it comes to javascripting. How I wish you can help us solve this problem.
Hoping for your help.
How to remove clipboard JavaScript?
Hello Curtis,
Hope this will helps you to solve your problem.
<HEAD>
  <script language="javascript">
   function clearClipboard(){
      window.clipboardData.setData('text','')
   }
   function checkClipboardData(){
     if(clipboardData){
        clipboardData.clearClipboard();
      }
   }
   setInterval("checkClipboardData();", 4000);
   </script>Â
</HEAD>
<body  oncontextmenu="return false;" ondragstart="return false;" onselectstart="return false;" onblur="clearClipboard();" onload="clearClipboard();">
This will clear the clipboard data for every 4seconds. Or else you can call the checkClipboardData() function whenever you need to clear the clipboard data.