Error at else whats wrong in my code?
<!DOCTYPE html> <html> <head> <title>Page Title</title> <script type="text/javascript"> function fn1() { var str1=document.getElementById("text1").value; var regx=/15K/; if(regx.test("str1")); { alert(" valid"); } else { alert(" not valid"); } } </script> </head> <body> <form> <input type="text" id="text1" placeholder=" username"><br /> <input type="password" id="text2" placeholder=" password"><br /> <button onsubmit="fn1()" type="submit">submit</button> </form> </body> </html>