<input type="button" onclick="show_table();" value="changer">et pas
<button ...
e veux que le <select> </select> fonctionne uniquement grâce au clic du <button>
<html xmlns="http://www.w3.org/1999/xhtml"> <head> <title>Document sans nom</title> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> <body> <div style="width: 750px;border:1px solid;margin: 5px;padding: 3px;height: 25px;"> <div id="category" style=";"> <select id='monselect' style="width:85%; height:25px; float:left;font-size: 11px;"> <option disabled="disabled" >test</option> <option disabled="disabled" >essai</option> <option disabled="disabled" > bonjour</option> </select> </div> <div style="width: 15%; height: 25px; float: right; right:30px;font-size: 11px;color: #551679;"> <button onclick="Enable_select();" >changer</button> </div> </div> <script type="text/JavaScript"> function Enable_select(){ var elem = document.getElementById('monselect'); var opt = elem.options; for(i=0;i<opt.length;i++){ opt[i].disabled=""; } } </script> </body> </html>
Vous n’avez pas trouvé la réponse que vous recherchez ?
Posez votre questionles flèches d'affichage du menu déroulantTu veux parler des flèches de la scrollbar du SELECT ?
.monselect::-webkit-scrollbar {display:none;} .monselect::-moz-scrollbar {display:none;} .monselect::-o-scrollbar {display:none;} .monselect::-google-ms-scrollbar {display:none;} .monselect::-khtml-scrollbar {display:none;}
<style type="text/css"> #select1{ -webkit-appearance: none; /*Removes default chrome and safari style*/ -moz-appearance: none; /*Removes default style Firefox*/ text-indent: 1px; text-overflow: ''; } </style> <script type="text/javascript"> function expandSelect(id, size) { var select = document.getElementById(id); if(select.size == select.options.length){ select.size = 1; }else{ select.size = select.options.length; } } </script> <select size="1" id="select1" onclick="this.size=1"> <option value="">hello <option value="">abc <option value="">234 </select> <button onclick="expandSelect('select1')"> Test </button>