Small JS project giving the possibility of limiting the number of inputs in a textarea in a personalized way.
By using it, you won't have to worry about the number of inputs you have to type.
- Include the script in your HTML file.
- Create a textarea with an id.
- In script.js, add in "DOMContentLoaded" the function "textLength(inputId, parentId, max)".
- In the function, add the id of the textarea, the id of the parent element and the number of inputs you want to type.
<script>
document.addEventListener("DOMContentLoaded", function() {
textLength("textarea", "parent", 10);
});
</script>
- Initial release
- The project is still in development.