JS to HTML5 page <Select></Select> bind selected items

Source: Internet
Author: User

Example 1:

1 //The second-level case type has changed2$ ("#SecondCasetypelist"). Change (function () {3             varChild = $ ("#SecondCasetypelist"). Children ();4             varselecting = 0;5              for(i = 0; i < child.length; i++) {6                 if(child[i].selected) {7selecting + = 1;8                 }9             }Ten             if(Selecting = = 0) One             { Achild[0].selected =true; -             } -             Else if(Selecting > 1) the             { -child[0].selected =false; -             } -Loadhtml ($ (' #tableCustom '), ' Customreport ', {year: $ ("#Year"). Val (), Month: $ ("#Month"). Val (), Casestatus: $ ("# Secondcasetypelist "). Val (), Flot:" 2 " }); +});

Example 2:

1  //list Meeting Type functions2     functionappendstrconferencetype (source)3     {4         Debugger5         varType = $ (' #con_category '). Children ();6         if(Source = = 1)7         {8type[0].selected =true;9         }Ten         Else if(Source = = 2) One         { Atype[1].selected =true; -         } -         Else  the         { -type[2].selected =true; -         } -}

JS to HTML5 page <Select></Select> bind selected items

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.