用个浮动层盖住select不给操作就行,另外给 select 加上了一个 onfocus=”this.blur();”, 防止客户用键盘来修改值。
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <span style="position:relative"> <select onfocus="this.blur();"><option value="1">1</option><option value="2">2</option><option value="3">3</option></select> <div style="position:absolute;width:100%;height:100%;left:0px;top:0px;background:#fff;opacity:0;filter:alpha(opacity=0)"> </div>
原创文章,作者:奋斗,如若转载,请注明出处:https://blog.ytso.com/tech/pnotes/14058.html