All for Joomla The Word of Web Design

Max length limit in textarea with javascript

Today , i am creating a post relating to set max lenght with javascript , There are many plugin available which provide us this type of feature. But we can create this feature very easily by following the code. Today, we will learn how to set max lenght in text area. also we will show type and remaining limit count.

I will create a very simple example to create this script. we don’t need Jquery for this. Because i will use pure javascript. i will use events like onkeyup and onkeydown and length function of the javascript.

It would be easy to use onkeyup and onkeydown event to make character count validation in html.Just review the code and copy the code.

Result :

here the Code:

Thanks for following the tutorial,please share the post if you like it.

1 Comment

Leave a Comment

Login

Welcome! Login in to your account

Remember me Lost your password?

Lost Password