select 只读 但能显示下拉菜单

 1   <select onfocus="this.defaultIndex=2;" onchange="this.selectedIndex=this.defaultIndex;">
 2       <option value="1">1</option>
 3       <option value="2">2</option>
 4       <option value="3" selected>3</option>
 5       <option value="4">4</option>
 6   </select>
 7   <select>
 8       <option value="1" disabled>1</option>
 9       <option value="2" disabled>2</option>
10       <option value="3" selected disabled>3</option>
11       <option value="4" disabled>4</option>
12   </select>

 

posted @ 2020-09-21 10:55  tcanhe  阅读(196)  评论(0编辑  收藏  举报