SoFunction
Updated on 2025-03-01

Code for disabling right-click and copy-paste functions of JS input text box


function click(e)
{
if ()
{
if (==1||==2||==3)
{
oncontextmenu='return false';
}
}
if ()
{
if ( == 3)
{
oncontextmenu='return false';
}
}
}
if ()
{
();
}
=click;
= new Function("return false;")
var trxdyel=true
var hotkey=17 /* hotkey is the key value of the hotkey, which is the ASII code, here 99 represents the c key */
if ()
()
function gogo(e)
{
if ()
{
if (==hotkey && trxdyel)
{
alert('Action error. Maybe you pressed the wrong key!');
}
}
else if ()
{
if (==hotkey&&trxdyel){ alert('Action error. Maybe you pressed the wrong key!'); }}
}
=gogo