Jump to content

ElijahTivey

New Members
  • Content Count

    1
  • Joined

  • Last visited

Community Reputation

0 Neutral

About ElijahTivey

  • Rank
    Newbie
  • Birthday 03/04/1995

Profile Information

  • Gender
    Male
  • Location
    London
  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.