Jscript Validate textarea

Dotnetfundakumar
Posted by Dotnetfundakumar under JavaScript category on | Views : 2850
< html xmlns="http://www.w3.org/1999/xhtml" >
< head runat="server" >
< title > Untitled Page< /title >
< script >
function test11()
{
var t1=document.getElementById("Txt1").value.length;
if (t1==10)
{
alert('10 Characters only allowed');
return false;
}
}


< /script >
< /head >

< body >
< form id="form1" runat="server" >

< textarea id="Txt1" onkeydown ="return test11();" >
< /textarea >

< /form >
< /body >
< /html >

Comments or Responses

Login to post response