Javascript

Javascript

am 23.04.2007 14:28:29 von Alf C Stockton

Please tell the difference between:-
document.getElementById("Amount").innerHTML = " ";
and
document.getElementById("Amount").value = " ";

--
Regards,
Alf Stockton www.stockton.co.za

He is now rising from affluence to poverty.
-- Mark Twain
My email disclaimer is available at www.stockton.co.za/disclaimer.html

--
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Re: Javascript

am 23.04.2007 14:32:04 von Stut

Alf Stockton wrote:
> Please tell the difference between:-
> document.getElementById("Amount").innerHTML = " ";
> and
> document.getElementById("Amount").value = " ";

Not all DOM objects have an innerHTML attribute, and likewise not all of
them will have a value attribute. For example,

and have
innerHTML, and has value.

There are plenty of web-based resources that will tell you what
attributes different objects have. Google is your friend.

-Stut

--
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Re: Javascript

am 23.04.2007 14:34:38 von php

Isn't it so that HTML tags that are coupled (like and

) have innerHTML, and that values pushed to their innerHTML
ends up within them?
Like

[innerHTML]

Just a thought.. No energy for Google! right now.

Mike


Stut skrev:
> Alf Stockton wrote:
>> Please tell the difference between:-
>> document.getElementById("Amount").innerHTML = " ";
>> and
>> document.getElementById("Amount").value = " ";
>
> Not all DOM objects have an innerHTML attribute, and likewise not all
> of them will have a value attribute. For example,
and
> have innerHTML, and has value.
>
> There are plenty of web-based resources that will tell you what
> attributes different objects have. Google is your friend.
>
> -Stut
>

--
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php