原生js获取select被选中的option

原生js获取select被选中的option

解决方法:

<script type="text/javascript">

  function test(){

  var select = document.getElementById("select");

   var str = [];

   for(i=0;i<select.length;i++){

    详情:http://yayihouse.com/yayishuwu/chapter/1836

   }

   alert(str);

扫描二维码关注公众号,回复: 5723151 查看本文章

  }

 </script>

猜你喜欢

转载自blog.csdn.net/qq_30908729/article/details/88902508