Saturday 12 January 2013

no control key to copy/paste

your code goes here :
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<title>no control key to copy/paste</title>
<script language="javascript">
function whichButton(event)
{
if (event.button==2)//RIGHT CLICK
  {
  window.event.returnValue = false;
  }

}
function noCTRL(e)
{
var code = (document.all) ? event.keyCode:e.which;

var msg = "Sorry, this functionality is disabled.";
if (parseInt(code)==17) //CTRL
{
alert(msg);
window.event.returnValue = false;
}
</script>
</head>
<body>
<form method="">
<strong>Not Allow Paste </strong><BR>
<input type="text" value="" onMouseDown="whichButton(event)"  onKeyDown="return noCTRL(event)"/>
</form>
</body>
</html>
no control key to copy/paste
Not Allow Paste

No comments:

Post a Comment

Do you think it could be useful for you? Share your thoughts with us!