Horje
html form reject default drop down list Code Example
html form reject default drop down list
//To force form validation on a select input:
//you need to use the required attribute on your select form and
//set the value of the initial option to "".
//Notice that you have to set the value -""- as invalid
<form>
  <select id="cars" name="cars" required aria-invalid="">//Required tag + "" is considered invalid
	<option value="" selected disabled hidden>Choose car...</option> //Default option
	  <option value="volvo">Volvo XC90</option>
	  <option value="saab">Saab 95</option>
	  <option value="mercedes">Mercedes SLK</option>
	  <option value="audi">Audi TT</option>
</select>
  <button type="submit">Submit</button>
</form>




Html

Related
curl html file Code Example curl html file Code Example
input type text cache clear Code Example input type text cache clear Code Example
how to get number list in html Code Example how to get number list in html Code Example
ionic 5-star-rating Code Example ionic 5-star-rating Code Example
how to add telephone number in html Code Example how to add telephone number in html Code Example

Type:
Code Example
Category:
Coding
Sub Category:
Code Example
Uploaded by:
Admin
Views:
11