Transaction = function(){
this.selectedIp = function(){
var data = {};
data.env = _env_select.val();
var successfn = function(jdata){
var _HTML = "";
_deploygroup_select.html("");
$.each(jdata,function(i,val){
_HTML = _HTML + "<option value="+jdata[i][0]+">"+jdata[i][0]+"</option>";
});
_deploygroup_select.html(_HTML);
};
var errorfn = function(jdata){
alert("数据返回出错");
};
$.ajax({
type: "get",
data: data,
url: "/api/deploygroup",
dataType: "json",
success: function(d){
successfn(d);
},
error: function(e){
errorfn(e);
}
});
};
http://20.5.101.31:9000/api/deploygroup/?env=TEST
[["test01"], ["test02"], ["test03"], ["test04"], ["test05"], ["test06"]]
jquery 遍历