selectエレメントを作成したあと表示させたい時はposition:absoluteでおk
なので
//element作成 select_element = document.createElement('select'); //座標指定できるように。これがないとどっかの領域に適当に表示される。 select_element.style.position = "absolute"; //座標指定 select_element.style.left = "100"; select_element.style.top = "100"; select_element.style.width = "100"; select_element.style.height = "100"; //ついでにz軸も select_element[i].style.zIndex = 1; //OPTIONを試しに2個追加 var option1 = document.createElement('option'); var option2 = document.createElement('option'); option1.appendChild(document.createTextNode("OPTION_TEXT1")); option2.appendChild(document.createTextNode("OPTION_TEXT2")); option1.value = "VALUE1"; option2.value = "VALUE2"; //OPTIONをSELECTにくっつける select_element.appendChild(option1); select_element.appendChild(option2); //#base_layerっていうidのelementにくっつけてみた。 $('#base_layer').append(select_element);
な感じでjavascript上でselectオブジェクトはつくれますなりよ。