Click to See Complete Forum and Search --> : body innerHTML


Ice3T
08-06-2003, 03:14 AM
Why doesn't this work

<html>
<body onLoad=this.innerHTML='yo dude!' >




</body>
</html>

AdamBrill
08-06-2003, 07:18 AM
The problem is that the 'this' there is referrering to the window. If you want it to work, use this line instead:

<body onLoad="document.body.innerHTML='yo dude!';">

Ice3T
08-07-2003, 09:52 PM
I see, Thank you.

Sux0rZh@jc0rz
08-08-2003, 12:06 AM
whats the point of this code?? just type yo dude in the html body...?

Ice3T
08-13-2003, 10:03 PM
The goal of this code was a test to have no display of the content of a page wich is altered by the server and then show it once it has been altered client side thus avoiding a banner(for example). It was in other words, just for fun.