Techknow Study

Input field should not be left empty

7:14:00 PM vikas 2 Comments Category :


WAP in java script to check for input field should not be left empty.

 As we all aware about the social networking site FaceBook. When you fill up the sign up form or thee sign in form, if u leave a box empty it give the error or we can say a message that is about to filling the empty box. This form filling format is adopted by  all valuable sites.
Which is helpful to take the full information about the user or client.
so yes if you are a new java learner or a side developer it will to you.
I suggest take the advantage of this and always
be updated.


<script type=”text/javascript”>
Function valid()
{   If(document.validate.input.value.length==0)
alert(“please fill up the require field”);
alert(“you enter”+document.validate.input.value);
<title>JSP PAGE</title>
<form name=”validate”>
required field<input type=”text” name=”input”/>
<input type=”button” value=”ok”  onclick=”valid()”/>