Sort of.

Like I said, the folling will work:


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

Try it.



No, this will not work, if it appeared working, please re-check your data, and make sure you didn't miss anything...

Run the following in any browser, and see whether you get a pop up, then change class= to ID=, and run it again.
<body onload='alert(document.getElementById("question").innerHTML)'>
<p class="question">
   Who is Roger Rabbit?

innerHTML works off an object, and it does nothing if youu cannot even locate the object in the first place.

Using Opera's revolutionary e-mail client:

PHP General Mailing List (
To unsubscribe, visit:

Reply via email to