jquery操作select

<!doctype html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>test</title>
</head>
<body>
<script type="text/javascript" src="jquery-1.12.1.min.js"></script>
    <select id="test"><option value="1" name="段誉">段誉</option><option value="2" name="阿紫">阿紫</option><option value="3" name="段正淳">段正淳</option></select>

</body>
</html>
<script type="text/javascript">
$(function(){
   $("#test option[name='阿紫']").attr("selected", true);       
})

</script>
原文地址:https://www.cnblogs.com/busicu/p/5263253.html