Jump to content

ElijahTivey

New Members
  • Posts

    1
  • Joined

  • Last visited

About ElijahTivey

  • Birthday 03/04/1995

Profile Information

  • Gender
    Male
  • Location
    London

ElijahTivey's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. This seems to work for me: <html> <head><style> #monkey {color:blue} #ape {color:purple} </style></head> <body> <span id="monkey" onclick="changeid()"> fruit </span> <script> function changeid () { var e = document.getElementById("monkey"); e.id = "ape"; } </script> </body> </html> The expected behaviour-changing the colour of the word "fruit". Perhaps your document was not fully loaded when you called the procedure?
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.