1. <ul id="0c1fb"></ul>

      <noscript id="0c1fb"><video id="0c1fb"></video></noscript>
      <noscript id="0c1fb"><listing id="0c1fb"><thead id="0c1fb"></thead></listing></noscript>

      99热在线精品一区二区三区_国产伦精品一区二区三区女破破_亚洲一区二区三区无码_精品国产欧美日韩另类一区

      RELATEED CONSULTING
      相關(guān)咨詢
      選擇下列產(chǎn)品馬上在線溝通
      服務(wù)時間:8:30-17:00
      你可能遇到了下面的問題
      關(guān)閉右側(cè)工具欄

      新聞中心

      這里有您想知道的互聯(lián)網(wǎng)營銷解決方案
      BootStrapselect2動態(tài)改變值的方法-創(chuàng)新互聯(lián)

      1,selec2動態(tài)賦值

      網(wǎng)站的建設(shè)創(chuàng)新互聯(lián)公司專注網(wǎng)站定制,經(jīng)驗豐富,不做模板,主營網(wǎng)站定制開發(fā).小程序定制開發(fā),H5頁面制作!給你煥然一新的設(shè)計體驗!已為成都垃圾桶等企業(yè)提供專業(yè)服務(wù)。
      var temp=JSON.stringify({ id: "1|所有停車場", name: "所有停車場" });
      $("#e_pid").attr("value", tempP);
                    $("#e_pid").select2({
                      placeholder: "查找停車場名稱(多選)",
                      language: "zh-CN",
                      minimumInputLength: 1,
                      allowClear: true,
                      multiple: true,
                      ajax: {
                        // instead of writing the function to execute the request we use Select2's convenient helper
                        url: "/manage/park/index/json/index",
                        dataType: 'json',
                        data: function (term, page) {
                          return {
                            parkName: term,// search term
                            powerpid: "1"
                          };
                        },
                        results: function (data, page) { // parse the results into the format expected by Select2.
                          // since we are using custom formatting functions we do not need to alter remote JSON data
                          for (var i = 0; i < data.length; i++) {
                            data[i].id = data[i].id+"|"+data[i].name;
                          };
                          data.push({ id: "577cb125f8d2c404572413d1|無", name: "無" });
                          return {
                            results: data
                          };
                        }
                      },
                      initSelection: function (element, callback) {
      //賦初始值
                        // the input tag has a value attribute preloaded that points to a preselected movie's id
                        // this function resolves that id attribute to an object that select2 can render
                        // using its formatResult renderer - that way the movie name is shown preselected
                        var data = [];
                        var value = ""
                        var str = $(element).val().split('^');
                        for (var i = 0; i < str.length; i++) {
                          var temp = JSON.parse(str[i]);
                          value += temp.id + ",";
                          data.push(temp);
                        }
                        ;
                        value = value.substring(0, value.length - 1);
                        $(element).val(value);
                        callback(data);
                      },
                      formatSelection: function (item) {
                        return item.name;//注意此處的name,要和ajax返回數(shù)組的鍵值一樣
                      }, // 選擇結(jié)果中的顯示
                      formatResult: function (item) {
                        return item.name;//注意此處的name
                      },// 搜索列表中的顯示
                      dropdownCssClass: "bigdrop", // apply css that makes the dropdown taller
                      escapeMarkup: function (m) {
                        return m;
                      }
                    });

      另外有需要云服務(wù)器可以了解下創(chuàng)新互聯(lián)建站www.cdcxhl.com,海內(nèi)外云服務(wù)器15元起步,三天無理由+7*72小時售后在線,公司持有idc許可證,提供“云服務(wù)器、裸金屬服務(wù)器、高防服務(wù)器、香港服務(wù)器、美國服務(wù)器、虛擬主機、免備案服務(wù)器”等云主機租用服務(wù)以及企業(yè)上云的綜合解決方案,具有“安全穩(wěn)定、簡單易用、服務(wù)可用性高、性價比高”等特點與優(yōu)勢,專為企業(yè)上云打造定制,能夠滿足用戶豐富、多元化的應(yīng)用場景需求。


      新聞標(biāo)題:BootStrapselect2動態(tài)改變值的方法-創(chuàng)新互聯(lián)
      網(wǎng)站鏈接:http://www.ef60e0e.cn/article/dgisje.html
      99热在线精品一区二区三区_国产伦精品一区二区三区女破破_亚洲一区二区三区无码_精品国产欧美日韩另类一区
      1. <ul id="0c1fb"></ul>

        <noscript id="0c1fb"><video id="0c1fb"></video></noscript>
        <noscript id="0c1fb"><listing id="0c1fb"><thead id="0c1fb"></thead></listing></noscript>

        双桥区| 永德县| 久治县| 红河县| 准格尔旗| 托里县| 晋州市| 榆社县| 惠水县| 五台县| 平果县| 吐鲁番市| 封丘县| 息烽县| 抚顺市| 吐鲁番市| 克东县| 武城县| 长宁县| 永川市| 来安县| 固镇县| 玉环县| 潜江市| 会宁县| 澎湖县| 菏泽市| 克拉玛依市| 晋江市| 甘洛县| 旅游| 贺州市| 梁平县| 平顺县| 保亭| 噶尔县| 辛集市| 上杭县| 共和县| 洛川县| 威远县|