program 1
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>
0 comments