Textbox Max Length Setting
Using attr method we can give the maxlength property to the textbox. Please check below complete jquery example for more details. This is one of the good JQuery Interview Question.
Using attr method we can give the maxlength property to the textbox. Please check below complete jquery example for more details. This is one of the good JQuery Interview Question.
<html> <head> <script type="text/javascript"
src="http://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js"></script>
<script type="text/javascript">
$(document).ready(function() { $("#txtLengthValidation").attr('maxlength','6'); }); </script>
</head> <body> <input style="WIDTH: 275px" id="txtLengthValidation" name="realname" class="required"
size="25" minlength="2" placeholder="First Name" > <b>aspnettutorialonline.blogspot.com</b>
</body> </html>
Post a Comment
Please give your valuable feedback on this post. You can submit any ASP.NET article here. We will post that article in this website by your name.