ちょー適当Ver
javascript
1<style>
2.combobox,.combobox div {
3width:200px;
4position:relative;
5}
6.combobox .wrap{
7overflow-x:scroll;
8position:absolute;
9}
10.combobox .wrap:not(.active){
11display:none;
12}
13.combobox table{
14 border-collapse:collapse;
15}
16.combobox table td{
17 background-Color:yellow;
18}
19.combobox table td:not(:first-child){
20 border-left:solid 1px gray;
21}
22</style>
23<script>
24document.addEventListener('click',e=>{
25 const t=e.target;
26 const div=t.nextElementSibling?.closest('.wrap')||document.querySelector('div.active');
27 if(t.closest('.combobox input')){
28 div.classList.add('active');
29 }else{
30 div.classList.remove('active');
31 }
32 if(t.closest('.combobox td')){
33 t.closest('.combobox').querySelector('input').value=t.closest('tr').dataset["value"];
34 }
35});
36</script>
37test<br>
38test<br>
39test<br>
40<div class="combobox">
41<input name="myBrowser">
42<div class="wrap">
43<table>
44<tr data-value="001">
45<td>001</td>
46<td>hogehoge</td>
47<td>123456</td>
48<td>************</td>
49</tr>
50<tr data-value="002">
51<td>002</td>
52<td>fuga</td>
53<td>7890123456</td>
54<td>************</td>
55</tr>
56<tr data-value="003">
57<td>003</td>
58<td>piyopiyopiyo</td>
59<td>789</td>
60<td>************</td>
61</tr>
62</table>
63</div>
64</div>
65test<br>
66test<br>
67test<br>
68test<br>
69test<br>
70test<br>