global_backend_url = "http://localhost:8080/ipcps-restful";
//file_upload_url = "http://ipcps.oss-cn-hangzhou.aliyuncs.com";
file_upload_url = "http://58.54.251.155:8088/wzzgh-upload"; 

function getQueryString(name) {
    var reg = new RegExp("(^|&)" + name + "=([^&]*)(&|$)", "i"); 
    var r = window.location.search.substr(1).match(reg); 
    if (r != null) return unescape(r[2]); 
    return null; 
} 

function json2Form(json,formId) {
    //console.log("json2Form");

    for(var name in json) {
        //console.log( name + "=" + json[name]);

        var inputEl = $("input[name='" + name +"']",$("#" + formId));
        
        if(inputEl !=null ){
            inputEl.val(json[name]);
        }

        var selectEl = $("select[name='" + name +"']",$("#" + formId));

        if(selectEl !=null ){
            selectEl.val(json[name]);
        }
    }
}