Web HTML-HTML.com

HTML Codes

HTML Codes > Forms > <INPUT ...>
previous page <INPUT SRC="..."> <INPUT ACCESSKEY="..."> next page

Attributes for <INPUT ...>
DISABLED
READONLY

READONLY and DISABLED both remove the functionality of the input field, but to different degrees. READONLY locks the field: the user cannot change the value. DISABLED does the same thing but takes it further: the user cannot use the field in any way, not to highlight the text for copying, not to select the checkbox, not to submit the form. In fact, a disabled field is not even sent if the form is submitted.

Currently only MSIE recognizes either of these attributes.

this code produces this
<INPUT NAME="realname" VALUE="Hi there" READONLY>
<INPUT NAME="realname" VALUE="Hi there" DISABLED>

It's important to understand that READONLY merely prevents the user from changing the value of the field, not from interacting with the field. For many types of fields, READONLY is irrelevent because you don't normally change the value. In checkboxes, for example, you can check them on or off (thus setting the CHECKED state) but you don't change the value of the field. DISABLED , however, actually prevents you from using the field. notice in these examples that you can set the checkboxes even though they are "read only":

this code produces this
<INPUT NAME="mushrooms" TYPE=CHECKBOXREADONLY>mushrooms<BR>
<INPUT NAME="onions" TYPE=CHECKBOXREADONLY>onions<BR>
<INPUT NAME="peppers" TYPE=CHECKBOXREADONLY>peppers
mushrooms
onions
peppers
<INPUT NAME="mushrooms" TYPE=CHECKBOXDISABLED>mushrooms<BR>
<INPUT NAME="onions" TYPE=CHECKBOXDISABLED>onions<BR>
<INPUT NAME="peppers" TYPE=CHECKBOXDISABLED>peppers
mushrooms
onions
peppers

previous page <INPUT SRC="..."> <INPUT ACCESSKEY="..."> next page


Recommended: Link Popularity Software : WebPosition Gold : Google Cash : Arelis : Optilink : Search Engine Optimization Software : Search Engine Submission Software : Mike's Marketing Tools : Mike's Ecommerce Software : Search Engine Rankings : Link Popularity Checker : Cheap Domain Registration : Keywords