<form> <input type=text name=mytext> <input type=submit onclick="if(mytext.value=='')return false"> <form>