There are a few very common points of knowledge that need to be focused on. How do I display a multi-marquee? <input type= "checkbox" name= "name" value= "value1" ><input type= "checkbox" name= "name" value= "value2" >. This can represent two multi-box, they have the same name value, in the JSP, to the background, you can use Request.getparametervalues ("name") to get an array, the array contains the front page passed over the value of multiple check boxes. This is an off-topic. The main purpose of today is to look at how to make multiple selections, uncheck, and uncheck the checkboxes with a review of jquery.
For jquery on multi-marquee operations, there are very basic questions. How do I select the multi-marquee above? $ ("input") can get to multiple elements on the page based on input, they are all input elements, and then add a filter $ ("Input[type= ' checkbox") to get the two elements of a checkbox. Further, add a filter and change to $ ("input[type= ' checkbox '][name= ' name ')" To get exactly the two elements written above.
In addition, since the acquisition of two elements, the need for traversal operations, how to write it?$ ("input[type= ' checkbox '][name= ' name ']"). each (function () {//todo SOMETHING}); So it's really very simple, just like for (int i;i++ ; i<10) {} is the same. The following is the code of this example, although very humble, just review, in the project, more sophisticated is not necessarily, as long as, can complete the demand, robust operation, convenient maintenance, enough.
<! DOCTYPE HTML PUBLIC "-//w3c//dtd HTML 4.01 transitional//en" >