JSFiddle - React, Tailwind, and code Playground

by Purag Moumdjian

HTML

<select size="1" id="D1">
</select>

JavaScript

var select = document.getElementById("D1"),
    opt = document.createElement("option");
opt.value = "value";
opt.textContent = "text to be displayed";
select.appendChild(opt);