HTML给select添加placeholder的技巧

1.使用默认option再隐藏此选项

<select>  
    <option value='' disabled selected style='display:none;'>Please Choose</option>  
    <option value='0'>Open when powered (most valves do this)</option>  
    <option value='1'>Closed when powered, auto-opens when power is cut</option>  
</select>

2.使用默认otpion再disable此选项

<select>  
   <option value="" disabled selected>Select your option</option>  
   <option value="hurr">Durr</option>  
</select>

 

posted @ 2018-03-27 20:52  雾以泪聚rx  阅读(28650)  评论(0编辑  收藏  举报