We hope you enjoy your visit.

You're currently viewing our forum as a guest. This means you are limited to certain areas of the board and there are some features you can't use. If you join our community, you'll be able to access member-only sections, and use many member-only features such as customizing your profile, sending personal messages, and voting in polls. Registration is simple, fast, and completely free.


Join our community!


If you're already a member please log in to your account to access all of our features:

Username:   Password:
Add Reply
document.innerHTML
Topic Started: Mar 24 2005, 12:15 PM (410 Views)
Ryan Fan
Nitrogenix
[ *  *  * ]
I'm making a script,and would like to know...

When do I use ?:

Quote:
 
document.write('some')


and how do I create table elements on the page , is it

Quote:
 
document.innerHTML('<div .... ')


?

Offline Profile Quote Post Goto Top
 
Gornakle
Member
[ *  *  *  *  * ]
document.write() writes HTML to the screen. Which at the same time answers your second question. ;)
Code:
 
document.write('<div..');
Offline Profile Quote Post Goto Top
 
Ryan Fan
Nitrogenix
[ *  *  * ]
but what's the innerHTML for ?

I tried using document.write('<div....

but didn't work... nly worked with text :/ and images
Offline Profile Quote Post Goto Top
 
Stefan
Member Avatar
Mew?
[ *  *  *  *  *  *  * ]
innerHTML isn't a method, it's a property.
You can assign a value to a property.
So it's

document.innerHTML = 'blah whatever'

and not

document.innerHTML('blah whatever')

If the document object would have an innerHTML property, that is. It doesn't, so that won't work either
Offline Profile Quote Post Goto Top
 
1 user reading this topic (1 Guest and 0 Anonymous)
« Previous Topic · Technology Chat · Next Topic »
Add Reply