Home >Web Front-end >JS Tutorial >js code to limit text bytes in form_form effects

js code to limit text bytes in form_form effects

WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB
WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOriginal
2016-05-16 19:12:39919browse

/*
value: value;
byteLength: database byte length
title: field Chinese name
attribute: attribute name
Instructions for use:

Add (1) onkeyup="limitLength(this.value,100,'name','name')"
        (2) id="name" or [struts tag] styleId="name"
Note: id name and attribute The attribute names should be the same

Example:

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