Hi Michiel,
It sounds like you're able to access the attribute using something
like:
var myVal = document.getElementById('#inputBox').defaultValue; //
similar to the w3cschools example
This is a DOM attribute rather than an XHTML attribute - which is why
the attr method won't return the value.
You should file a net ticket for this. http://dev.jquery.com/newticket
--
Brandon Aaron
On 4/21/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
Well i can get the defaultvalue by direct accessing it, but i wonder
why not via jquery. It's not very consistent to access all via the
attr and defa
Well i can get the defaultvalue by direct accessing it, but i wonder
why not via jquery. It's not very consistent to access all via the
attr and defaultValue direct and i don't like that.
W3schools says it's a w3c complaint attribute so i think it should be
accessible.
This is what they say : "Set
I think you want attr("value") for the value in the dom, vs ,val() for the
current contents.
defaultValue is a shortcut to get to the defined value from the html I
haven't used it but I have seen similar things with form items.
On 4/21/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
Whil
do you actually have an attribute on your input element called
"defaultValue"?
like this:
defaultValue="theDefaultValue">
then you could say:
$("#myTextID").val();
and that would give you: someValue
or you could say:
$("#myTextID").attr("defaultValue");
and that would give you: theDefa
5 matches
Mail list logo