• <sub id="h4knl"><ol id="h4knl"></ol></sub>
    <sup id="h4knl"></sup>
      <sub id="h4knl"></sub>

      <sub id="h4knl"><ol id="h4knl"><em id="h4knl"></em></ol></sub><s id="h4knl"></s>
      1. <strong id="h4knl"></strong>

      2. javascript獲取select值的方法和分析

        時間:2024-07-22 02:09:04 JavaScript 我要投稿
        • 相關推薦

        javascript獲取select值的方法和分析

          1. 獲取顯示的漢字

          代碼如下:

          document.getElementById(bigclass).options[window.document.getElementById(bigclass).selectedIndex].text

          2. 獲取數據庫中的id

          代碼如下:

          window.document.getElementById(bigclass).value

          3.獲取select組分配的索引id

          代碼如下:

          window.document.getElementById(bigclass).selectedIndex

          例子:

          1 2 3 4 select name=bigclass id=bigclass onChange=javascript:updatePage2(); option value= selected=selectedajax實驗/option option value=4我適宜市哈/option /select

          使用:

          代碼如下:

          document.getElementById(bigclass).options[window.document.getElementById(bigclass).selectedIndex].text

          結果是:我適宜市哈

          使用:

          代碼如下:

          window.document.getElementById(bigclass).value

          結果是:4

          使用:

          代碼如下:

          window.document.getElementById(bigclass).selectedIndex

          結果是:1

        【javascript獲取select值的方法和分析】相關文章:

        Javascript函數的定義和用法分析08-15

        JavaScript常用方法匯總10-25

        Javascript中arguments對象的詳解和使用方法08-20

        如何獲取PHP數組的鍵與值呢10-25

        JavaScript數組常用方法介紹09-04

        javascript跨域訪問的方法07-09

        javascript編程異常處理的方法08-04

        JavaScript fontcolor方法入門實例07-07

        關于javascript對象之內置和對象Math的使用方法10-08

        javascript分析運算符用法08-07

        国产高潮无套免费视频_久久九九兔免费精品6_99精品热6080YY久久_国产91久久久久久无码
      3. <sub id="h4knl"><ol id="h4knl"></ol></sub>
        <sup id="h4knl"></sup>
          <sub id="h4knl"></sub>

          <sub id="h4knl"><ol id="h4knl"><em id="h4knl"></em></ol></sub><s id="h4knl"></s>
          1. <strong id="h4knl"></strong>

          2. 在线观看国产精品日韩AV | 亚洲欧美自拍另类欧美亚洲中文字 | 在线播放麻豆嫩草影院AV | 亚洲国产欧美在线观看片不卡 | 亚洲精品精品在线 | 亚洲春色中文字幕我是洋洋 |

            javascript獲取select值的方法和分析

              1. 獲取顯示的漢字

              代碼如下:

              document.getElementById(bigclass).options[window.document.getElementById(bigclass).selectedIndex].text

              2. 獲取數據庫中的id

              代碼如下:

              window.document.getElementById(bigclass).value

              3.獲取select組分配的索引id

              代碼如下:

              window.document.getElementById(bigclass).selectedIndex

              例子:

              1 2 3 4 select name=bigclass id=bigclass onChange=javascript:updatePage2(); option value= selected=selectedajax實驗/option option value=4我適宜市哈/option /select

              使用:

              代碼如下:

              document.getElementById(bigclass).options[window.document.getElementById(bigclass).selectedIndex].text

              結果是:我適宜市哈

              使用:

              代碼如下:

              window.document.getElementById(bigclass).value

              結果是:4

              使用:

              代碼如下:

              window.document.getElementById(bigclass).selectedIndex

              結果是:1