0
Canât change HTML element on Submit
Iâve been trying to create a program that gets a number as an input and outputs an array directly related to that number in the HTML paragraph. Iâm not sure how to do this. Every time I run the code the array is undefined and thereâs a script error. Here is a simpler version of this code: https://code.sololearn.com/WBJqK1x6cRb3/?ref=app
5 RĂ©ponses
+ 2
Does this do what you want it to do?
https://code.sololearn.com/W6x8Zc3RMFc4/?ref=app
+ 1
Change "getElementByTagName" to "getElementsByTagName".
Also, what are you wanting to be displayed in the alert box?
+ 1
Yes, thank you! (:
+ 1
No problem đ
0
The array should be alerted when itâs about to replace âresultâ from the paragraph. it always says âundefinedâ. I used it to know if my list ever got created... It never gets created