How implement subj?
when i write:
<form> <select> <option value="0">aaaa</option> <option value="1">bbbb</option> </select> </form>
then default selected item is "aaaa"
when i write:
<form> <select> <option value=""></option> <option value="0">aaaa</option> <option value="1">bbbb</option> </select> </form>
then default selected item is blank, but this blank item presents in drop down.
how i can implement SELECT tag with default blank value that hidden in dropdown list?
Just use disabled and/or hidden attributes:
<option selected disabled hidden style='display: none' value=''></option>
selected
makes this option the default one.disabled
makes this option unclickable.style='display: none'
makes this option not displayed in older browsers. See: Can I Use documentation for hidden attribute.hidden
makes this option to don't be displayed in the drop-down list. If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With