Change the selected value of a drop-down list with jQuery
问题 I have a drop-down list with known values. What I\'m trying to do is set the drop down list to a particular value that I know exists using jQuery. Using regular JavaScript, I would do something like: ddl = document.getElementById(\"ID of element goes here\"); ddl.value = 2; // 2 being the value I want to set it too. However, I need to do this with jQuery, because I\'m using a CSS class for my selector (stupid ASP.NET client ids...). Here are a few things I\'ve tried: $(\"._statusDDL\").val(2)