style and disabled?

M

Martin

Is disabled to be set in the style of a tag just like visible? I am trying
to set the whole content of a td tag to disabled like this,
style='disabled:true' and it does not seem to work. Is this possible of is
disabled not to be set in style?
 
R

RobG

Martin said:
Is disabled to be set in the style of a tag just like visible? I am trying
to set the whole content of a td tag to disabled like this,
style='disabled:true' and it does not seem to work. Is this possible of is
disabled not to be set in style?

It's actually an HTML question, but since you're here...

In the HTML 4 specification, 'disabled' is an attribute of button,
input, optgroup, option, select, and textarea elements. It can have two
values: true or false.

<URL:http://www.w3.org/TR/html4/interact/forms.html#adef-disabled>


It's value can be set in the HTML source (if set, the value is 'true'
and the element is disabled):

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

Or by script:

<form ...>
<input type="text" name="textA">
<input type="button" value="Disable textA" onclick="
this.form.textA.disabled = true;
">
...
</form>


If set to 'true', the element is disabled. If set to false, it is
enabled (i.e. is is not disabled).
 

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

No members online now.

Forum statistics

Threads
474,431
Messages
2,571,679
Members
48,796
Latest member
Greg L.

Latest Threads

Top