<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>无标题 1</title>
<script type="text/javascript"  src="Scripts/jquery-1.4.1-vsdoc.js"></script>
</head>
<body>
<form method="post">
 <select >
 <option value="0"></option>
 <option value="1">11</option>
 <option value="2">22</option>
 <option value="3">33</option>
 </select></form>
</body>
<script  type="text/javascript" defer="defer">
    var doms = document.getElementsByTagName("select");
    //doms[0].value="1";

    //doms[0].options[2].selected = true;

    //jquery方法
    $("#s2 option[index=3]").attr("selected", true)
</script>
</html>

相关文章:

  • 2021-06-23
  • 2021-06-30
  • 2021-12-05
  • 2022-12-23
  • 2022-12-23
  • 2021-10-04
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-06-13
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案