tags:

views:

3937

answers:

2

Hi Guys, what is the code to disable an INPUT text box for HTML?

Thanks

+8  A: 

<input type="text" disabled="disabled"/>

See the HTML 4.01 spec for more.

Greg
+2  A: 

The syntax to disable an HTML input is as follows:

<input type="text" id="input_id" DISABLED />
fasih.ahmed
RoBorg's answer is valid in XHTML also.
scunliffe
The HTML 4.1 Specification he directs to, has the same code as in my answer.
fasih.ahmed