<html> <head> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/> <script> function validateInputs(){ var myinput=document.forms["myform"]["myinput"]; if(myinput.value==""){ alert("Metin boş olamaz!"); return false; }else{ alert("Metin doğru "+myinput.value); return true; } } </script> </head> <body> <h1>JavaScript Belge Form</h1> <form id="myform" onsubmit="return validateInputs()"> <input type="text" id="myinput" ><br/> <br/> <input type="submit" value="Gönder"></input> </form> </body> </html>Dosyayı İndir