-
Replace text in a div
I know how to replace text inside a given div:
document.getElementById("containerID").innerHMTL = "some new text";
But I want to change text depending on text that is in an array.
So I have an array:
my_array =
{
'Good' : 'Bad',
'Happy' : 'Sad',
}
How can I change the text in a div with the key of the array? So if my div contains the word good I want to change it to bad.
-
woops! wrong place! supposed to be in the javascript section.
Thread Information
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)
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
|
|
Bookmarks