JavaScript for Textarea?
>> Friday, June 17, 2011
TextArea Validation
<html> <title>TextArea</title> <head> <script type="text/javascript"> function CheckComments(thisform) { comments = document.f1.Comments.value if (comments == "") { Message = "No Comments added" + "\n" alert("no comments are added"); } else { Message = "" } return false; } </script> </head> <body> <form action="/bhaskar" name="f1"> <table> <tr> Comments:<td height="151" valign="top" colspan="4" align="center"> <textarea name="Comments" cols="40" rows="7"></textarea> </td> </tr> </table> <input type="submit" value="submit" onclick="CheckComments(f1);return false;"></input> </body> </html>
0 comments:
Post a Comment