Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Disabled <input> that allows text selection?

Tags:

html

Is it possible for a disabled <input> tag to support text selection?

like image 426
Nick Heiner Avatar asked Jan 18 '11 16:01

Nick Heiner


People also ask

How do I make a text input non editable for a part of it?

The readonly attribute makes a form control non-editable (or “read only”). A read-only field can't be modified, but, unlike disabled , you can tab into it, highlight it, and copy its contents.

What specifies that an input field should be disabled?

The disabled attribute is a boolean attribute. When present, it specifies that the <input> element should be disabled. A disabled input element is unusable and un-clickable.

What is the difference between a readonly input and a disabled input?

The difference between disabled and readonly is that read-only controls can still function and are still focusable, whereas disabled controls can not receive focus and are not submitted with the form and generally do not function as controls until they are enabled.


1 Answers

You could use the ReadOnly attribute.

like image 113
g.d.d.c Avatar answered Nov 12 '22 04:11

g.d.d.c