Hi I am new in Java Script and I am very confused with the random command in Java because in Python its so different. I need help, because I want to made a Website on wich you have 3 Buttons, when you press thefirst, only one random word fromt the first list is getting written in the text class above the Buttons and when you press the 2 Button only one Word from the 2. Array appears. But my Java Code doesnt work like it should. Here is the Code.
var Orte=('a','b','c')
var zufall=random(Orte)
button1.onclick= document.getElementByclass('text')[0].innerHTML = 'zufall'
Thanks a lot
Aucun commentaire:
Enregistrer un commentaire