We are using two text boxes where we insert email id
email id -----------
email id -----------
but we dont want to copy -pest here.
tell me the code for java line to block this options ''Ctrl+C'', andd ''Ctrl+V'' used to copy - pest purpose
Function noCTRL(e)
{
var code = (document.all) ? event.keyCode:e.which;
var ctrl = (document.all) ? event.ctrlKey:e.modifiers & Event.CONTROL_MASK;
var msg = "Sorry, this functionality is disabled.";
if (document.all)
{
if (ctrl && code==86) //CTRL+V
{
alert(msg);
window.event.returnValue = false;
}
else if (ctrl && code==67) //CTRL+C (Copy)
{
alert(msg);
window.event.returnValue = false;
}
}
else {
if (ctrl==2) //CTRL key
{
alert(msg);
return false;
}
}
}
898 views
Usually answered in minutes!
×