Answers for "text field read only"

2

read only html

<!-- Using readonly attribute is use to prevent changing of input value. -->
Example:
<input type="text" name="username" value="lol" readonly>
Posted by: Guest on August-17-2020
0

make all fields read only in form

<form>
    <fieldset disabled="disabled">
        <input type="text" name="something" placeholder="enter some text" />
        <select>
            <option value="0" disabled="disabled" selected="selected">select somethihng</option>
            <option value="1">woot</option>
            <option value="2">is</option>
            <option value="3">this</option>
        </select>
    </fieldset>
</form>
Posted by: Guest on August-06-2021

Browse Popular Code Answers by Language