Ich versuche, Option in Select-Tag hinzuzufügen, aber es funktioniert nicht.So fügen Sie wählen in Javascript
container.appendChild(document.createTextNode("location"));
var select = document.createElement("select");
var option1 = document.createElement("option");
option1.text = "mumbai";
option1.value = "mumbai";
container.appendChild(option1);
container.appendChild(select);
Du fügst das 'option' Element, was auch immer' container' enthält und nicht die 'select' – Andreas
ich möchte hinzufügen dymiic wählen Option –
dynamisch durch Add buttun –