Re: GetElementByClass?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



At 12:18 PM -0400 4/3/10, tedd wrote:
At 8:14 AM -0600 4/3/10, Peter Pei wrote:
No javascript's getElementByID() won't work here. As "question" is a class, not an ID. But like what was mentioned here, you can use getElementByClass() with Opera, and that will work.

Sort of.

Like I said, the folling will work:

document.getElementById("question").innerHTML;

While you are using a getElementById, which returns an ID, but adding .innerHTML will return the class value.

Try it.

Cheers,

tedd
--


Nope, I was wrong here.

I was looking at the wrong example.

Cheers,

tedd



--
-------
http://sperling.com  http://ancientstones.com  http://earthstones.com

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


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux