<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、智譜、豆包、星火、月之暗面及文生圖、文生視頻 廣告
                > 效果如圖 ![](https://box.kancloud.cn/c83b3ebbf5e9090eca263ebf57bc7707_595x725.gif) > html代碼 ``` <input type="text" id="shop"> <input type="text" id="phone"> <button id="add">添加</button> <table id="table"> <thead> <tr><th>商城</th><th>手機</th></tr> </thead> <tbody> <tr><td>天貓</td><td>小米</td></tr> <tr><td>天貓</td><td>小米</td></tr> <tr><td>天貓</td><td>小米</td></tr> <tr><td>天貓</td><td>小米</td></tr> </tbody> </table> ``` > js代碼 ``` window.onload = ()=>{ var table = document.getElementById("table"); var shop = document.getElementById("shop"); var phone = document.getElementById("phone"); var add = document.getElementById("add"); var rows = table.tBodies[0].rows; //獲得當前的rows,此時是類數組對象 var rows_arr = Array.prototype.slice.call(rows); //將現在的rows轉換為array console.log(rows_arr); //tr tr tr tr rows_arr.forEach((element, index)=>{ if(index%2 == 0) { element.style.backgroundColor = "pink"; }else { element.style.backgroundColor = "aqua"; } }) add.onclick = ()=>{ var shopValue = shop.value; var phoneValue = phone.value; var tr = document.createElement("tr"); var td1 = document.createElement("td"); var td2 = document.createElement("td"); td1.append(shopValue); td2.append(phoneValue); tr.append(td1, td2); table.tBodies[0].append(tr); var rows_arr2 = Array.prototype.slice.call(rows); //將現在的rows數量轉換為array // console.log(rows_arr2);//tr tr tr tr tr rows_arr2.forEach((element, index)=>{ if(index%2 == 0) { element.style.backgroundColor = "pink"; }else { element.style.backgroundColor = "aqua"; } }) } } ```
                  <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>

                              哎呀哎呀视频在线观看