+ 1

NEED HELP!!!! JAVASCRIPT1!!

CAN'T FIND THE MISTAKE!!!! BEFORE ADDING THE SECOND FUNCTION everything worked fine but after i added it the first one STOPPED WORKING!!!! I DON'T KNOW WHAT I DID WRONG PLEASE HELP!!! var counter=0; function onmousecounter (element) { counter++; element.innerHTML= "Chromosome count " + counter ; } function valid (form) { var name = form.name.value; var password = form.password.value; var rpass = form.rpass.value; var adr_pattern =/[0-9 a-z - .] + @ [0-9 a-z -]+\|.[a-z0]{2,5}/i; var dad = form.dad.value; var fail = false; var email = form.email.value; if (name == "" || name == " ") fail = "text"; else if (password ==""||password == " ") fail ="text"; else if (adr_pattern.test(email)==false) fail ="text"; else if (rpass!=password || rpass = " " || rpass= "") fail ="text"; else if (dad =="") fail ="text"; if (fail) alert(fail); else window.location="https://vk.com/vladm2001"; } </script> </head> <body> <br /> <div id="maksimka"> <p id="o"><h1 id="o2"><center>text</center></h1></p> </div> <div id="block"> <span onmouseover="onmousecounter(this)">Chromosome count 0</span> <form name="text"action="" method="post"> <lable for="sad"> text</label> <input type="text" placeholder="Поиск..." name="sad" id="sad"/> <p><lable for="name"> text</label> <input type="text" name="name" placeholder="TEXT" id="n1"/></p> <p><lable for="password"> TEXT</label> <input type="password" placeholder="На горшке сидела моль" name="password" id="p1"/></p> <p><lable for="rpass"> TEXT</label> <input type="password" name="rpass" placeholder="TEXT" id="p2"/></p> <p><lable for="email"> TEXT</label> <input type="text" name="email" placeholder="email" id="e1"/></p> <p><lable for="dad"> TEXT</label> <input type="checkbox" name="dad" id="dad"/></p>

29th Nov 2017, 8:31 PM
-skyalien-
-skyalien- - avatar
1 Odpowiedź
0
<div id = “block”> Did you forget to end it with </div> or is it just me?....
29th Nov 2017, 10:15 PM
Norberttony
Norberttony - avatar