获取select选中的option的 value 和 文本

  <select  id=" routine">
        <option   value="22222">555555555</option>
  </select>
 var a1 = $("#routine").val() //22222
 var a4 = $("#routine option[value=" + a1 + "]").text() //555555555
发布了17 篇原创文章 · 获赞 11 · 访问量 569

猜你喜欢

转载自blog.csdn.net/weixin_45563734/article/details/101695294