First, describe
We publish the state in space, and when we enter a character, the number of remaining input characters is reduced by one until the number of characters entered reaches the maximum number of previous sets, as shown in the following:
Second, the realization method
First, we first determine the maximum input length in the text box, followed by the input of a character lift the keyboard to verify the character length in the input text box, and dynamically displayed in the remaining number of characters to be entered.
Third, the source code
<%@ page language= "java" pageencoding= "UTF-8"%><%@ taglib uri= "/struts-tags" prefix= "s"%><%@ taglib URI = "Http://java.sun.com/jsp/jstl/core" prefix= "C"%><%@ taglib uri= "http://java.sun.com/jsp/jstl/fmt" prefix= " FMT "%><%string path = Request.getcontextpath (); String basepath = request.getscheme () + "://" +request.getservername () + ":" +request.getserverport () +path+ "/";%> <! DOCTYPE HTML PUBLIC "-//W3C//DTD XHTML 1.0 transitional//en" "Http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd ">
JS (JavaScript) dynamically determine the number of input text boxes remaining can be entered characters