Today in doing additions and deletions to change, using the Javascrip language, add and modify after completion, in the delete, you need to use form form to obtain.
The problem is that after adding a form, adding and modifying features doesn't make it.
Here is the button code in my JSP page
The type should be a button, not a submit. (There can be multiple button buttons in a form form, but only one submit button)
Submit is a special case of the button and a button, which automatically integrates the commit action. If the form after the click on the Submit button needs to be processed with JS (including input validation) and then submit, it is usually necessary to change the submit to button, otherwise, will result in two times the effect, for Dynamic Web page, that is, the database operation two times. (excerpt from 劤 's footsteps )
Submit and Button differences:
(1) Submit the form submission (Form.submit ()) as the default event after its onclick, the button is not the case.
(2) When a form is submitted, all HTML input elements with the name attribute (including input tags, button labels, select Labels, and so on) are submitted as key-value pairs, except for the Submit object. The Submit object is only submitted as a key-value pair in the commit after it has been clicked.
It is important to understand the difference between them, because you can call Java directly in the JavaBean when using submit, and if you use a button, the response function for the button must be written in JavaScript. JavaScript cannot be called directly to Java, but only through DWR technology.
Can see http://blog.sina.com.cn/s/blog_693d183d0100uolj.html, this writing is quite detailed.
Differences between the use of Submit and button in a JSP page's form