Jquery_review's jquery enables multi-marquee selection, selection, and all-in-the-box selection

Source: Internet
Author: User

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" >

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.