select 对当前选项显示文本的获取 m.options[m.selectedIndex].text | selectz
  lrdUmT56VgbP 2023年11月30日 31 0

select 对当前选项显示文本的获取 m.options[m.selectedIndex].text | selectz

<html>
  <head>
    <title>select</title>
  </head>
  <body>
    <select id="mySelect">
      <option value="volvo">Volvo111</option>
    <option value="saab">Saab111</option>
    <option value="mercedes">Mercedes111</option>
    <option value="audi">Audi111</option>
    </select>
    <script>
      function getSelect () {
        const m = document.getElementById('mySelect')
        console.info('m', m)
        console.info('m.value', m.value)
        console.info('m.text', m.text)
        console.info('m.name', m.name)
        console.info('m.innerText', m.innerText)
        console.info('m.selectedIndex ', m.selectedIndex )
        console.info('m.selectedIndex ', m.selectedIndex )
        console.info('m.options[m.selectedIndex].text', m.options[m.selectedIndex].text)
      }
    </script>
  </body>
</html>

---------------------------------------------
生活的意义就是你自己知道你要做什么,明确目标。没有目标,后面都是瞎扯!

https://pengchenggang.gitee.io/navigator/

SMART原则:

目标必须是具体的(Specific)
目标必须是可以衡量的(Measurable)
目标必须是可以达到的(Attainable)
目标必须和其他目标具有相关性(Relevant)
目标必须具有明确的截止期限(Time-based)



【版权声明】本文内容来自摩杜云社区用户原创、第三方投稿、转载,内容版权归原作者所有。本网站的目的在于传递更多信息,不拥有版权,亦不承担相应法律责任。如果您发现本社区中有涉嫌抄袭的内容,欢迎发送邮件进行举报,并提供相关证据,一经查实,本社区将立刻删除涉嫌侵权内容,举报邮箱: cloudbbs@moduyun.com

  1. 分享:
最后一次编辑于 2023年11月30日 0

暂无评论

推荐阅读
  8l4CZpTOKa7P   2023年12月26日   34   0   0 htmlhtml
  dwHry2iKGG0I   2023年12月26日   28   0   0 githubgithubhtmlhtml
lrdUmT56VgbP