|
-
Sep 22nd, 2002, 01:24 PM
#1
Thread Starter
Fanatic Member
Javascript to change a single part of a page?(resolved)
I'm fairly new to javascript and was wondering how I could use javascript to change text in a single part of my table, as opposed to writing the whole page again with document.write.
Last edited by Graff; Sep 23rd, 2002 at 01:10 PM.
If wishes were fishes we'd all cast nets.
-
Sep 22nd, 2002, 02:13 PM
#2
Frenzied Member
You can use innerHTML, although it's not officially in the spec and Opera doesn't [yet] support it:
Code:
//NAME attribute:
document.elementName.innerHTML = '<em>This</em> is the new text, etc';
//ID attribute:
document.getElementById('elementId').innerHTML = '<em>This</em> is the new text, etc';
-
Sep 23rd, 2002, 12:10 AM
#3
Thread Starter
Fanatic Member
hmm thanks
who cares about opera (jk... please don't eat my babies)
If wishes were fishes we'd all cast nets.
-
Sep 23rd, 2002, 04:32 AM
#4
Frenzied Member
HEh, your babies will be eaten Opera 7 is supposed to be comming out at the end of the year, and it may have a fix for that. They're implementing a better DOM so they may add innerHTML.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|