In web development, you often encounter such problems: how dynamically add or delete a text input box on the page? There are usually two ways: 1. Use the background service: such as setting a variable NUM in the session, each Click the "Add" button NUM value 1, then the page is refreshed (return to this page). When displayed, take the value of NUM from the session, then use the cyclic generated input box <% for (int i; i < %}%> The situation is similar to this, that is, after clicking the "Delete" button, NUM's value -1, then refresh the page. This method can indeed realize the dynamic increase or delete a text input box, just you were previously on the page There is no time to fill in. And you need the processing of the background server, which has a certain impact. This is not a good method 2. Using the page script, such as JavaScript implementation. JavaScript is not a problem, and the speed is naturally not a problem, and What you have filled in on the page does not lose because of your increase or delete text, use it is very convenient, here is given example: