Re: GetElementByClass?
| From: | tedd | Date: | Sat, 03 Apr 2010 16:29:49 +0000 |
| Subject: | Re: GetElementByClass? | ||
| References: | 1 2 3 4 5 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-303793@lists.php.net to get a copy of this message | ||
At 9:14 AM -0600 4/3/10, Peter Pei wrote:
You're right -- I re-looked at the code to solve a similar problem and it is indeed ID and not class. I was using the wrong example. Cheers, tedd -- ------- http://sperling.com http://ancientstones.com http://earthstones.comIn your original post, you said the data you had was: <p class="question"> Who is Roger Rabbit? </p> Does that still stand? or there was a typo, and class should really be ID?Somejavascript engine already support GetElementByClass, for example Opera does.My example shows how, namely: document.getElementById("question").innerHTML; will return the value within the class. Cheers, tedd