createElement()でプルダウンボックス(セレクトボックス)を追加

var select        = document.createElement("select");
var option_google = document.createElement("option");
var option_yahoo  = document.createElement("option");
var option_baidu  = document.createElement("option");

option_google.setAttribute("value", "Google");
option_google.appendChild( document.createTextNode("Google") );

option_yahoo.setAttribute("value", "Yahoo!");
option_yahoo.appendChild( document.createTextNode("Yahoo!") );

option_baidu.setAttribute("value", "Baidu");
option_baidu.appendChild( document.createTextNode("Baidu") );

select.setAttribute( "name", "engine");
select.appendChild(option_google);
select.appendChild(option_yahoo);
select.appendChild(option_baidu);
$("hoge").appendChild(select);

textareaの場合

同じ手順で問題ないが、

hoge.setAttribute("value", "hoge");

valueの設定ができない。
なのでappendChild()で追加後、

document.getElementById("hoge").value="hoge";

で追加する。