Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <script>
- function addText() {
- /* There will be an id in the html called "addTextID" where this string will be added
- when the button with the onclick function is pressed.
- */
- document.getElementById('addTextID').innerHTML += "This is a new string. ";
- }
- function changeColor() {
- /* When the button with the onclick function is pressed the content within the
- tag with the id colorID will change color to green
- */
- document.getElementById("colorID").style.color = "green";
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement