Home > Article > Web Front-end > jquery common operation methods_jquery
Operation drop-down list
Add option list
$(this).get(0).options.add(new Option(text,value));
Clear the list
$(this).get(0).options.length=0;
Remove the option at the specified index
$(this).get(0).remove( index);
Set the value of the item to be selected
$(this).get(0).value=value;
Get the text of the currently selected option
$(this).get(0).options[index].text;
Batch modify CSS
$(this).css({left:"35px", top:"24px"})
Make the elements in the specified area unusable (grayed out)
$(this).find(*).each(function(){$(this ).attr("disabled",true)});