How to appenchild one time in form validation?

try to add appendchild one time when I click submit it show many time

if(input_name.value =="" ||input_email.value =="" || input_password.value =="")
    var tag = document.createElement("p");
    var text = document.createTextNode("all input are reqired");
    var element = document.getElementById("new");

Source link

Latest articles

Related articles

Leave a reply

Please enter your comment!
Please enter your name here