用js动态添加select标签的option

js代码:

var featureLayerURLTest=[["http://192.168.15.174:6080/arcgis/rest/services/Sample/GQYDGH/FeatureServer/0","线图层1"]];
function createSelectOption(featureLayerURLTest){
    var _html="";
    for(var _i=0;_i"+featureLayerURLTest[_i][1]+"";
    }
    $("#featureLayerOptions").append(_html);
    var html=$("#featureLayerOptions");
    //console.log(html);
}

$(function(){
    createSelectOption(featureLayerURLTest);
});

html代码:
选择操作图层:


你可能感兴趣的:(webgis,前端开发)