How to disable text in iput tag in a html | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 3

How to disable text in iput tag in a html

plz give me solution plz

5th Jul 2018, 10:17 AM
Azhar Shaha
Azhar Shaha - avatar
3 Answers
+ 6
Hello, Azhar Shaha ! 1. <input type='text' disabled='true'/> 2. <input type='text' readonly='true'/> 1. way completely disabled input, even from the side of javascript. The 2 way disabled the user from entering data, but you can use javascript
5th Jul 2018, 10:23 AM
Alexander Sokolov
Alexander Sokolov - avatar
+ 4
For shorter code of Alexander Sokolov Just put this: 1. <input type="text" disabled /> 2. <input type="text" readonly /> The default value is true.
6th Jul 2018, 2:51 AM
Email Not Activated
+ 2
Add the disabled="disabled" attribute
5th Jul 2018, 10:22 AM
TurtleShell
TurtleShell - avatar