国产av日韩一区二区三区精品,成人性爱视频在线观看,国产,欧美,日韩,一区,www.成色av久久成人,2222eeee成人天堂

當字元計數(shù)器達到 100 時顯示按鈕
P粉738821035
P粉738821035 2024-04-02 18:03:39
0
1
679

嘗試做一個測驗頁面,我需要在文字區(qū)域中寫入最少字元數(shù)後顯示「提交」按鈕。這是我嘗試過但無法使其發(fā)揮作用的方法。

<textarea  name="tweet" id="textbox"
          rows="13" cols="70" placeholder="" maxlength="250"></textarea><br>
        <span id="char_count">0/250</span>

        <script>
        let textArea = document.getElementById("textbox");
        let characterCounter = document.getElementById("char_count");
        const minNumOfChars = 0;
        const maxNumOfChars = 250;
        var text = document.getElementById("buton");
        const countCharacters = () => {
          let numOfEnteredChars = textArea.value.length;
          let counter = minNumOfChars + numOfEnteredChars;
          characterCounter.textContent = counter + "/250";
        };
        textArea.addEventListener("input", countCharacters);
        if (counter > 100 ) {
            text.style.display = "block";
        }
        else {
        }
        </script>

              <br><br><br>
              <div>
                <button class="NextStep" id="buton" style="display:none"
                onclick="NextStep()">Finalizare Curs</button>
              </div>
              <script>
             function NextStep() {
                 location.href =("Cursuri.html")
             }
             </script>

P粉738821035
P粉738821035

全部回覆(1)
P粉194919082

您的程式碼具有工作所需的所有必要部分,但您已經(jīng)像畢卡索的畫作一樣重新建構(gòu)了它!在正確的位置進行一些剪切-複製-貼上,就可以了!


   
      
      ΤΙΤΛΟΣ
   

   
      
0/250


sssccc
最新下載
更多>
網(wǎng)站特效
網(wǎng)站源碼
網(wǎng)站素材
前端模板