<button onclick="return myFunction()">Click me</button>
<p id="demo"></p>
<p id="demob"></p>
<script>
function myFunction() {
// append the whole html for a select
document.getElementById("demo").innerHTML += "<select><option value='1'>One</option></select>";
// or create one programatically and add it to the DOM
var select = document.createElement("select");
var option = document.createElement("option");
option.value = "1";
option.text = "One";
select.appendChild(option);
document.getElementById("demob").appendChild(select);
return false;
}
</script>