Use the ReadOnly property to make invalid text easier to read

Source: Internet
Author: User
Tags old windows
ADO is tired of squinting at gray text? ReadOnly can offer you a better solution.



Now I find the exact signal that I'm getting older is not a whole body, but it's becoming more and more difficult to understand the meaning of invalid text (disabled text) in the input box or text area of a Web page. For old folks like me who miss the old Windows 2000, the gray text seems to have a tendency to blend in with the background.

Fortunately, there are more inexpensive solutions than eye laser surgery, even with properties called ReadOnly. This property will display the invalid text in the same contrast as normal text, while still maintaining the failure characteristics of the text "Far view but not profane". This has become the best way to balance the two.

List A shows an example of how to use this property, and List B shows the actual situation. In short, this is definitely a much cheaper option than visiting ophthalmologists.

List A:

<?xml version= "1.0" encoding= "UTF-8"?>

<! DOCTYPE HTML Public '-//w3c//dtd XHTML 1.0 strict//en '

' Http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd ' >



<title>read only</title>


<body>

<table width= "100%" border= "0px" cellspacing= "0px"

cellpadding= "0px" >

<tr>

<th width= "33%"

Align= "left" >Normal:</th>

<th width= "33%"

Align= "left" >Disabled:</th>

<th align= "left" >read

Only:</th>

</tr>

<tr>

&LT;TD width= "33%" >

<input type= "Text"

Id= "Txtnormal"

Name= "Txtnormal" size= "10"

Value= "Xyzzy"/>

</td>

&LT;TD width= "33%" >

<input type= "Text"

Id= "txtdisabled" name= "txtdisabled"

Size= "Ten" value= "Xyzzy"

disabled= "Disabled"/>

</td>

<td>

<input type= "Text"

Id= "Txtreadonly" name= "Txtreadonly"

Size= "Ten" value= "Xyzzy"

readonly= "ReadOnly"/>

</td>

</tr>

<tr>

&LT;TD width= "33%" >

<textarea id= "Areanormal"

Rows= "4" cols= ">always"

Do right. This would gratify

Some people and astonish the

Rest. -Mark

Twain</textarea>

</td>

&LT;TD width= "33%" >

<textarea id= "areadisabled"

Rows= "4" cols= "30"

disabled= "Disabled"

readonly= "ReadOnly" >always do

Right. This would gratify some

People and astonish the rest. -

Mark twain</textarea>

</td>

<td>

<textarea id= "Areareadonly"

Rows= "4" cols= "30"

readonly= "ReadOnly" >always do

Right. This would gratify some

People and astonish the rest. -

Mark twain</textarea>

</td>

</tr>

</table>

</body>






Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.