JavaScript is a most popular client-side scripting language.
Here, I have shown a function named CheckForm which when called checks if the vaue for the txtInvNum input
<script language="Javascript">
function CheckForm()
{
if (document.formRS.txtInvNum.value = "")
{
error = "Error: Invoice No. is Compulsoroy";
alert(error);
return false;
}
else
{
return true;
}
}
</script>
The function can be called on press of button or
<LABEL onclick= CheckForm()> Check Form </LABEL>
0 comments:
Post a Comment