• bootstrat 设置 select option 选项的值


    <script>
        /**
             //把textarea替换成一个编辑器
            UE.getEditor('22upTips',{
                initialFrameWidth:"80%",
                initialFrameHeight:"200"
            });
        **/
          $(document).ready(function() {
            //select change 
            $("#app_type").change(function(){
                 var app_type=$(this).val();
                 var url="./index.php?module=operation&action=SelectChange";
                 var post_value = "app_type="+app_type;
                 $.ajax({
                    type: "POST",
                     url: url,
                     data: post_value,
                    dataType: 'json',
                    success: function(data){
    //清空option $(
    "#upVer").empty(); if(data==0){ alert('更新失败'); }else{ $(data).each(function(k,v){ //设置option选项 document.getElementById("upVer").innerHTML +=v[0].option; $("#mainVer").val(v.mainVer); $("#upTips").val(v.upTips); $("#assetPath").val(v.assetPath); $("#newUpiniPath").val(v.newUpiniPath); $("#appStore").val(v.appStore); $("#forceUpdateVersion").val(v.forceUpdateVersion); }); //刷新 $('#upVer').selectpicker('refresh'); } } }); }); }); </script>

    相关资料:http://silviomoreto.github.io/bootstrap-select/

  • 相关阅读:
    Es module vs require
    phaser3 画虚线实现
    新的计划
    [转]Boostrap Table的refresh和refreshOptions区别
    Storing Java objects in MySQL blobs
    【转】Ubuntu下搜狗输入法突然无法输入中文
    团队作业六
    团队作业七
    团队作业四
    团队作业三
  • 原文地址:https://www.cnblogs.com/hgj123/p/4496858.html
Copyright © 2020-2023  润新知