Blank HTML SELECT without blank item in dropdown list

前端 未结 8 1392
我寻月下人不归
我寻月下人不归 2020-12-23 08:37

How implement subj?

when i write:

Then use this jQuery to clear the drop down on page load:

$(document).ready(function() {
    $('#myDropDown').val(''); 
});

Or put it inside a function by itself:

$('#myDropDown').val(''); 

accomplishes what you're looking for and it is easy to put this in functions that may get called on your page if you need to blank out the drop down without reloading the page.

提交回复
热议问题