javascript - Disallow typing after reaching input max length -


I have some input on my page that requires a maximum length and is only working to an extent an additional The number is being added due to the one plugin we are using ... and no I can not get rid of this plugin.

To fix this I need to remove a character from the input field. I got it at the point where it will be removed from the value of the input, but it is still visible on the screen ... which is the problem.

Do they have a way to reject typing, hit a certain point using javascript? I can not use the maximum length in this case because we can completely ignore the use of virtual keyboards.

I have something like this

  var target = event.currentTarget; var name = $ (target) .attr ("name"); Var validations = $ (target) .attr ("verification"). Length; $ ('Input [name =' '+ name +'] '). ('Keyup keydown change', function (if ($ (this) .val () Length; validationLength) {$ (this) .val (). Substr (0, $ (this) .val ( ). Length -1);};});   

And like I said it will remove from the value of the input, but the user will not actually appear on the screen (the most important part). Any help will be very much appreciated!

  verification lang = 10; $ ('# Exam') ('Keypad keydown change', function () (if ($ (this) .val (). Length & gt; Values ​​Lag) {val = $ (this) .val (). Substr () 0, $ (this) .val () Length-1); $ (this) .val (val);};});   



Comments

Popular posts from this blog

php - PDO bindParam() fatal error -

logging - How can I log both the Request.InputStream and Response.OutputStream traffic in my ASP.NET MVC3 Application for specific Actions? -

java - Why my included JSP file won't get processed correctly? -