you might be a asp.net developer or web developer who needs to show to the user simply that maximum number of characters that can be entered in a text box and prevent user typing additional characters.
<span> Brief Text <br> <span id="msg">(125 Maximum Characters) </span> </span>
Here the span id named “msg” is the label that user will be informed with number of characters left.
So what you have to do in your web page is following,
the first parameter passed to the function is maximum characters user can enter. and the second parameter is textbox name and the third is the name of output message label.
You can use this in asp.net pages as well but make sure clientid mode is set accordingly or make sure to get client id of the text box and label correctly. Caution : Still you have to validate the input from server whether the input is not tampered with other tools and length is not exceeded.