0

i have django project and resgitration form and submit button (class="btn") i want when click btn after print text in console but doesn't work. this is my code -->

  var p = document.getElementsByClassName("btn");
  p.onclick = showAlert;

  function showAlert(event) {
    aler("onclick Event triggered!");
  }

this is html --->

<input type="submit" name="register" class="btn">
koki
  • 93
  • 1
  • 8

0 Answers0