This article mainly introduces the restriction of input in the html code text box, the text box turning gray, and the restriction of text box input. Friends who need it can refer to it.
Method 1: Set the readonly attribute to true.
INPUT value=readonly readOnly
Method 2: Set the disabled attribute to true.
INPUT disabled value=disabled
Method 3: Immediately blur the object when it is focused so that it cannot gain focus.
INPUT onfocus=this.blur() value=onfocus=this.blur()
For more html code text box limit input text box turns gray limit text box input related articles please pay attention to PHP Chinese website!