コンボボックスを実現できるかどうかのテスト
IE = IE9 / FF = Firefox 20 / Sa = Safari 5.1.7 / Cr = Chrome 26 / iP = iOS 6.1.3 (Safari)
.textField { font-size: 14px; width: 100px; } .bsize { font-size: 14px; }
<input name="textfield" type="text" class="textField" id="tField0"><select name="select" class="bsize" id="selBox0" onChange="getSelect(0,this.value)"><option value="test1">test1</option><option value="test2">test2</option><option value="test3">test3</option></select><input type="button" class="bsize" value="ボタン" onclick="getText(0)">
#selBox1 { font-size: 14px; width: 22px;}
<input name="textfield" type="text" class="textField" id="tField1"> <select name="select" class="selectBox" id="selBox1" onChange="getSelect(1,this.value)"><option value="test1">test1</option><option value="test2">test2</option><option value="test3">test3</option></select> <input type="button" class="bsize" value="ボタン" onclick="getText(1)">
#comboField { position: relative;}#tField2 { font-size: 14px; width: 100px; position: absolute; left: 0px; top: 0px;}#selBox2 { font-size: 14px; width: 120px;}
<div id="comboField"><input name="textfield" type="text" class="textField" id="tField2"><select name="select" class="selectBox" id="selBox2" onChange="getSelect(2,this.value)"><option value="test1">test1</option><option value="test2">test2</option><option value="test3">test3</option></select><input type="button" class="bsize" value="ボタン" onclick="getText(2)"></div>
<input name="textfield" type="text" class="textField" id="tField3" list="combolist"><input type="button" class="bsize" value="ボタン" onclick="getText(3)"><datalist id="combolist"><option value="test1">test1</option><option value="test2">test2</option><option value="test3">test3</option></datalist>
Back