Yes, this can be done. "disabled" is an attribute of the input element; it can be set to true or false, and its value can compared against those two. The syntax would be something like if (document.form.inputElement.disabled == 'true') The apostrophs around the boolean value may not be becessary, I don't quite remember.
Ulf already answered the question, but just to follow up on the quotation marks, I just tried it, and putting quotes doesn't work (tested in IE and Firefox). Since disabled is a boolean, you can just do the following:
I would challenge you to a battle of wits, but I see you are unarmed - shakespear. Unarmed tiny ad: