readonly

J

Jeff Thies

I'd like to set a checkbox to be readonly (this will be done server side
with CGI.pm).

I thought I could do this:

<input readonly="readonly" ...>

but this is also readonly:

<input readonly="" ...>

Is there a way to set readonly with an attribute pair, Or does the presence
of the string readonly make the only difference?

Jeff
 
T

Toby A Inkster

Jeff said:
Is there a way to set readonly with an attribute pair, Or does the presence
of the string readonly make the only difference?

These two should work:

<input readonly="readonly" ...>
<input readonly ...>

in HTML, but only the former in XHTML. It's a SHORTTAGS feature.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,581
Members
45,056
Latest member
GlycogenSupporthealth

Latest Threads

Top