In my script there is a list of words that populate a grid dynamically.
Is there a way to fill the list with the words that populate the grid through HTML?
I have this at the moment…
var listOfWords = ["mat", "cat", "dog", "pit", "pot", "fog"];
Is there a way to add more words in this list through HTML rather than in the script?
I ask because new words need to be added by colleges that can deal with HTML but not script
Thanks.
In theory, you could create an HTML structure that would create a DOM that could be parsed by JavaScript which would extract text from between certain elements (e.g. list items) and append those strings to the array.
… teaching people the very simple array syntax would be easier though.
… as would using a text file with one entry per line.