Using Javascript with HTML DOM
A Tech Talk on how javascript can interact with HTML DOM
Home | HTML | Data Types | DOM | JavaScript | JS Debugging |
Hacks
- Copy your HTML code from the HTML hacks. Write a Javascript snippet to switch the links of the two a tags when a button is pressed. Once they are switched, change the inner HTML of the top p tag to the word “switched!”
Basic: Switches links and changes p to “Switched!”
WikiHow To Change Button Color in HTML
StackOverflow Button Text Color Change
WikiHow To Change Button Color in HTML
StackOverflow Button Text Color Change
Advanced code: Switches link text too
<button id=”buttonID”, onclick=”switchLinks()”>Click here to change something</button>
WikiHow To Change Button Color in HTML
StackOverflow Button Text Color Change
<button id=”buttonID”, onclick=”switchLinks()”>Click here to change something</button>
WikiHow To Change Button Color in HTML
StackOverflow Button Text Color Change