Advertisement
Guest User

Untitled

a guest
Apr 16th, 2018
83
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. <script>
  2.     function addText() {
  3.     /* There will be an id in the html called "addTextID" where this string will be added
  4.     when the button with the onclick function is pressed.
  5.     */
  6.     document.getElementById('addTextID').innerHTML += "This is a new string. ";
  7. }
  8.  
  9. function changeColor() {
  10.     /* When the button with the onclick function is pressed the content within the
  11.     tag with the id colorID will change color to green
  12.     */
  13.     document.getElementById("colorID").style.color = "green";
  14.  
  15. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement