for the select tag on html.
instead of trying to appendChild.
select needs .add(element, reference)
example of code
selectTag=document.forms[0].selectTag
option1= document.createElement("option")
option1.text = "mama";
option1.setAttribute("value","mama");
selectTag.add(option1);
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment