javascript – Uncaught syntaxerror: unexpected identifier?

javascript – Uncaught syntaxerror: unexpected identifier?

There are errors here :

var formTag = document.getElementsByTagName(form), // form tag is an array
selectListItem = $(select),
makeSelect = document.createElement(select),
makeSelect.setAttribute(id, groups);

The code must change to:

var formTag = document.getElementsByTagName(form);
var selectListItem = $(select);
var makeSelect = document.createElement(select);
makeSelect.setAttribute(id, groups);

By the way, there is another error at line 129 :

var createLi.appendChild(createSubList);

Replace it with:

createLi.appendChild(createSubList);

javascript – Uncaught syntaxerror: unexpected identifier?

Leave a Reply

Your email address will not be published.