diff options
Diffstat (limited to 'openo-portal/portal-resmgr/src/main/webapp/resmgr-nfv/js/datacenter.js')
-rw-r--r-- | openo-portal/portal-resmgr/src/main/webapp/resmgr-nfv/js/datacenter.js | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/openo-portal/portal-resmgr/src/main/webapp/resmgr-nfv/js/datacenter.js b/openo-portal/portal-resmgr/src/main/webapp/resmgr-nfv/js/datacenter.js index a861165a..3a74ce10 100644 --- a/openo-portal/portal-resmgr/src/main/webapp/resmgr-nfv/js/datacenter.js +++ b/openo-portal/portal-resmgr/src/main/webapp/resmgr-nfv/js/datacenter.js @@ -227,12 +227,11 @@ $(function () { type: "GET", url: requestUrl, contentType: "application/json", - success: function (jsonobj) { - $.each(jsonobj.data, function (n, v) { - htmlContent += "<option value='" + v + "'>" + v + "</option>"; - $("#location").html(htmlContent); - - }); + success: function (jsonobj) {var str = jsonobj.data.replace('[', '').replace(']', '').split(',') + $.each(str, function (n, v) { + htmlContent += "<option value='" + v + "'>" + v + "</option>"; + $("#location").html(htmlContent); + }); }, error: function (xhr, ajaxOptions, thrownError) { |