Home › Forums › JavaScript › Trying to set the onClick attribute of an element inside a for loop. › Reply To: Trying to set the onClick attribute of an element inside a for loop.
December 20, 2015 at 6:28 pm
#236054
Participant
I think that happens because all of the script is wrapped in an anonymous (function() {})
, making the scope so that the inner can’t be reached with inline scripting.