<form action="#"> <select id="pulldown"> <option value="" selected>---------</option> </select> <input type="button" value="プルダウン生成" onclick="fCreatePulldownMenuA()" /> </form> <script type="text/javascript"> function fCreatePulldownMenuA(){ var todofuken=["---------","北海道","本州","四国","九州","沖縄"]; var selObj=document.getElementById("pulldown"); var length=selObj.childNodes.length-1; if(length>0){ /*
![DOMメソッド|DOM(Document Object Model): Element|JavaScript/DOM|PHP & JavaScript Room](https://cdn-ak-scissors.b.st-hatena.com/image/square/4785a29b81a3301fb946a3e1fdbe16b5b9dcab5f/height=288;version=1;width=512/http%3A%2F%2Fphpjavascriptroom.com%2Fcommon%2Fimages%2Fapple-touch-icon.png)