How do I make the button disabled after clicking?

  • 0
    There is a button like this:
    <input class="btn btn-info btn-block" id="submit" name="submit" type="submit" value="Продолжить">

    How can I make it disabled when clicked, and the text "Continue" changed to "Please wait", please tell me
    JavaScript Anonymous, Nov 15, 2019

  • 2 Answers
  • 0

  • 0
    const button= document.querySelector('.form_button')

    button.addEventListener('click', function(e) {
    this.textContent = 'Подождите пожалуйста'
    this.setAttribute('disabled', 'true')
    Clare Olson

Your Answer
To place the code, please use CodePen or similar tool. Thanks you!