<!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>
|