<ruby id="bdb3f"></ruby>

    <p id="bdb3f"><cite id="bdb3f"></cite></p>

      <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
        <p id="bdb3f"><cite id="bdb3f"></cite></p>

          <pre id="bdb3f"></pre>
          <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

          <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
          <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

          <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                <ruby id="bdb3f"></ruby>

                ??一站式輕松地調用各大LLM模型接口,支持GPT4、智譜、豆包、星火、月之暗面及文生圖、文生視頻 廣告
                # 表格內switch獲取行數據 ## 12.1.表格內switch獲取行數據 [用戶管理](https://demo.easyweb.vip/iframe/page/system/user.html)演示了表格內開關switch的使用,這里只用到了數據的id修改狀態, 如果要獲取所在行的更多數據,可以通過加`data-`屬性: ~~~ <script type="text/html" id="userTbState"> <input type="checkbox" lay-filter="userTbStateCk" value="{{d.userId}}" lay-skin="switch" data-name="{{d.username}}" data-sex="{{d.sex}}" lay-text="正常|鎖定" {{d.state==0?'checked':''}}/> </script> <script> form.on('switch(userTbStateCk)', function (obj) { var id = obj.elem.value; var data = $(obj.elem).data(); console.log(id + data.name + data.sex); }); </script> ~~~ 也可以利用`LAY_TABLE_INDEX`獲取: ~~~ <script type="text/html" id="userTbState"> <input type="checkbox" lay-filter="userTbStateCk" value="{{d.LAY_TABLE_INDEX}}" lay-skin="switch" lay-text="正常|鎖定" {{d.state==0?'checked':''}}/> </script> <script> form.on('switch(userTbStateCk)', function (obj) { var index = obj.elem.value; var data = table.cache['userTable'][index]; console.log(data.userId + data.username); }); </script> ~~~ 表格中的下拉框select的用法與表格中的開關switch是一樣的,可以參考使用: ~~~ <!-- 表格性別選擇列 --> <script type="text/html" id="tbBasicTbSex"> <div class="ew-select-fixed"> <select lay-filter="tbBasicTbSexSel" data-index="{{d.LAY_TABLE_INDEX}}"> <option value="">請選擇</option> <option value="男" {{d.sex=='男'?'selected':''}}>男</option> <option value="女" {{d.sex=='女'?'selected':''}}>女</option> </select> </div> </script> <script> form.on('select(tbBasicTbSexSel)', function(obj){ var index = $(obj.elem).data('index'); var data = table.cache['userTable'][index]; console.log(data); // 得到當前行數據 console.log(obj.value); // 得到被選中的值 }); </script> ~~~
                  <ruby id="bdb3f"></ruby>

                  <p id="bdb3f"><cite id="bdb3f"></cite></p>

                    <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
                      <p id="bdb3f"><cite id="bdb3f"></cite></p>

                        <pre id="bdb3f"></pre>
                        <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

                        <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
                        <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

                        <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                              <ruby id="bdb3f"></ruby>

                              哎呀哎呀视频在线观看