Icontem

File: maxchars.html

Recommend this page to a friend!
  Classes of Gianluca Zanferrari  >  jQuery Limit Characters Input  >  maxchars.html  >  Download  
File: maxchars.html
Role: Example script
Content type: text/plain
Description: example file
Class: jQuery Limit Characters Input
Limit the number of characters of text form inputs
Author: By
Last change:
Date: 11 months ago
Size: 611 bytes
 

Contents

Class file image Download
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Title of the document</title>
</head>

<body>
	Name:<br>
	<!-- the property maxChars="25" limits the number of allowed chars to 25 -->
	<input id="Name" maxChars="25" style="width:250px">
	<br>Address:<br>
	<!-- the property maxChars="40" limits the number of allowed chars to 40 -->
	<input id="Address" maxChars="40" style="width:250px">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
<script src="./maxChars.js"></script>
<script>
	var obj = new maxChars();
</script>
</body>

</html>