Top "Html-select" questions

An HTML user interface element for choosing one or more option(s) from a finite collection of options.

How do I clear all options in a dropdown box?

My code works in IE but breaks in Safari, Firefox, and Opera. (big surprise) document.getElementById("DropList").options.length=0; After …

javascript html-select
Working with select using AngularJS's ng-options

I have read about it in other posts, but I couldn't figure it out. I have an array, $scope.items = [ {…

javascript angularjs html-select ng-options
Removing an item from a select box

How do I remove items from, or add items to, a select box? I'm running jQuery, should that make the …

javascript jquery html html-select
Is there an onSelect event or equivalent for HTML <select>?

I have an input form that lets me select from multiple options, and do something when the user changes the …

javascript html html-select dom-events
How to use jQuery to select a dropdown option?

I was wondering if it’s possible to get jQuery to select an <option>, say the 4th item, …

javascript jquery html drop-down-menu html-select
Hide options in a select list using jQuery

I have an object with key/value pairs of options I want to hide/remove from a select list. Neither …

jquery html-select
How to change options of <select> with jQuery?

Suppose a list of options is available, how do you update the <select> with new <option>…

jquery html-select
How to style the <option> with only CSS?

Note: This question is not about making a custom dropdown. It's only about possibilities of styling <option> elements …

css html-select
How to set the 'selected option' of a select dropdown list with jquery

I have the following jquery function: $.post('GetSalesRepfromCustomer', { data: selectedObj.value }, function (result) { alert(result[0]); $('select[name^="salesrep"]').val(…

jquery html selected html-select
How to fire a change event on a HTMLSelectElement if the new value is the same as the old?

I have the following markup: <select onchange="jsFunction()"> <option value="1">1</option> <option value="2"&…

javascript dom-events html-select onchange