i have just started studying js with this js code \[code\]<div class="container"> <form name="myForm" action="#" method="post"> First name: <input type="text" name="fname"> <input type="submit" value="http://stackoverflow.com/questions/14555115/Submit" id="smit"> </form> <script>var smit=document.getElementById("smit");smit.addEventListener("click",formvalidate(),false); function formvalidate(){ console.log(" vua moi click submit"); if(t==null){ var t= document.forms["myForm"]["fname"].value; if(t==null || t==""){ alert("xin dien vao email"); } }}</script>\[/code\]When previewing in browser, a alert popup auto appear despite i not click on submit button.Can anyone please explain me what happening? Thanks.