zoukankan      html  css  js  c++  java
  • option生成

     function loadclass()
        {
            jQuery.ajax({
                url: "/Assets/GetDistinctClassNameByType",
                data: { typeid: $("#DDLTypeID").val() },
                type: "post",
                cache: false,
                dataType: "json",
                success: function(msg) {
                var select_root = document.getElementById('DDLAssetsName');
                select_root.options.length = 0;
                select_root.add(new Option("请选择", '-1'));
                    var data = msg.options;
                    $.each(data, function(i, n) {
                        if(n.text&&n.value)
                        {
                        var option = new Option(n.text, n.value);
                        select_root.add(option);
                        }
                    });
                }
            });
            var select_root = document.getElementById('DDLAssetsModel');
                select_root.options.length = 0;
                select_root.add(new Option("请选择", '-1'));
        }
  • 相关阅读:
    rocketmq的linux搭建环境
    linux调用本地shell脚本
    第二课
    第一课
    有意思的dos攻击
    信息收集
    url跳转挖掘
    Drozer之android_app分析实战
    缓存中毒
    随便写写
  • 原文地址:https://www.cnblogs.com/soonfly/p/1646619.html
Copyright © 2011-2022 走看看