Join the social network of Tech Nerds, increase skill rank, get work, manage projects...
  • How to show max words left to insert into text area

    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 435
    Comment on it

    Hello Reader's if you are making the html5 validation to set the max words inside the html form, Then by using Angular JS NG-Model you can easily make it. Lets's see how to do it as in the example below:-

    <!DOCTYPE html>
    <script src=""></script>
    <body ng-app="myNoteApp" ng-controller="myNoteCtrl">
    <textarea ng-model="message" cols="40" rows="10"></textarea>
    <button ng-click="save()">Save</button>
    <button ng-click="clear()">Clear</button>
    <p>Number of characters left: <span ng-bind="left()"></span></p>
    <script src="myNoteApp.js"></script>
    <script src="myNoteCtrl.js"></script>

    Now in the code above when user type the words it will show the remaining word in the next line;.

 0 Comment(s)

Sign In

Sign up using

Forgot Password
Fill out the form below and instructions to reset your password will be emailed to you:
Reset Password
Fill out the form below and reset your password: