MultiSelect gets the value of the selected multiple drop-down items (comma-delimited string)

Source: Internet
Author: User

1 /*Incoming drop-down Select label*/2  functionget_selected (mslt_employees) {3             varEmplo =mslt_employees.multiselect ("getchecked"). Map (function () {4                 return  This. Value;5 }). get ();6 7             if(IsArray (Emplo)) {//determines whether an array8List_str = Emplo.join (",");//array to comma-delimited string9}Else {Ten                 varList_str =Emplo; One             } A             returnList_str; -}
// method of determining whether an array is function (source) {            return ' [object Array] ' = = Object.prototype.toString.call (source);        }; 
// Incoming label var department = get_selected ($ ("#mslt_department")); //$ (this) is a jquery object var department = get_selected ($ (this));



The difference between this and $ (this) in jquery

 //  $ ("#textbox" ). Hover (   { this . title = "T         EST "; }, Fucntion () { this . title = "ok"; });//$ (this) is a jquery object, and the jquery object has no Title property, and jquery has the attr () method to get/set the DOM object's attribute function () {$ (this). attr (' Ti         Tle ', ' Test '); }//the wrong wording $ ( "#textbox"  "Test" ;              }, Function () {$ (this). title =  "OK" 

Original source: http://www.cnblogs.com/OnlyDreams/p/4143437.html

MultiSelect gets the value of the selected multiple drop-down items (comma-delimited string)

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.