Techknow Study

program 1

10:02:00 PM vikas 0 Comments Category :


1.Java script to check for input field should not be left empty .

=>program:-
<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()”/>
</form>
</body>
</html>

RELATED POSTS

0 comments