![]() |
|
|
+ Search |
![]()
|
Mar 20th, 2002 10:56
Saravpreet Minhas, Lakshmi Alluri,
write the following code in head tag
<script>
function check()
{
if (document.frm1.text1.value=="")
{
alert("text field is empty")
return false;
}
}
</script>
write the following code in body tag
<body>
<form name="frm1" onsubmit="return check()">
<input type=text name="text1">
<input type=submit>
</body>