Home >Web Front-end >JS Tutorial >js limits the number of bytes that can be entered into the input box_form effects

js limits the number of bytes that can be entered into the input box_form effects

WBOY
WBOYOriginal
2016-05-16 18:36:181038browse

The code is as follows: (Originally it was encapsulated based on the prototype, but it was found that the amount of code was completely increased, so it was changed back)

Thanks to sparks345 for raising the issue when pasting
In this case, we can only add a few more events onpropertychange, oninput, obj.watch("value",function(id,oval,nval){})
You can see here for details, tracking input value changes and compatible processing


[Ctrl A Select all Note: If you need to introduce external Js, you need to refresh to execute
]
Source: http:// www.cnblogs.com/sohighthesky/
Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn