why doesn't this work -> https://jsfiddle.net/hc8g901k/ [closed]

There are multiple issue,

  1. Issue with JSFiddle: JsFiddle declares are variable in local scope and hence cannot find the method. It should work on your page/website.

  2. There is a typo: getEementById missing l.

  3. Your object is in document so just write document.getElementById()

This works. https://jsfiddle.net/hc8g901k/5/

Leave a Comment