How does jquery dynamically select the option under select according to the value

If you want to query the value, select option under the drop-down selection


var tem="China"; 
$(" select option[value='"+tem+"']").attr("selected","selected"); //If the value is the same, select the corresponding option,

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=325769147&siteId=291194637