Home > Software engineering >  How to disable every click in page, only autofocus in input text?
How to disable every click in page, only autofocus in input text?

Time:06-13

Can I only write text input and enter, disable every click or move cursor, just autofocus in text input?

<input autofocus placeholder="RR" name="RR" id="RR" type="text">

Thank you..

CodePudding user response:

put pointer-events : none; in the css

put cursor : not-allowed; /* or none to allow clicks*/ if you want to disable cursor.

add autofocus to autofocus:

<input autofocus placeholder="RR" name="RR" id="RR" type="text" autofocus>

CodePudding user response:

SOLVED I found this method and worked :

enter link description here

$(document).ready(function() {
        $('body').mousedown(function(e) {
            return false;
        })
    })
  • Related