Techknow Study

Input field should not be left empty

7:14:00 PM vikas 2 Comments Category :



Program:-01

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.





=>

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

RELATED POSTS

2 comments