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>

原文:https://www.cnblogs.com/wylj/p/8660076.html

原文地址:https://www.cnblogs.com/shy1766IT/p/13555217.html