当接口返回的展示信息为XML格式时,为了方便查看,需要对标签进行换行
if(str.indexOf('\n') < 0) {
str=str.replace(/>/gi,'>\n')
} else {
str = str.replace(/> /gi,'>\n')
}
str = str.replace(/</gi, '<')
当接口返回的展示信息为XML格式时,为了方便查看,需要对标签进行换行
if(str.indexOf('\n') < 0) {
str=str.replace(/>/gi,'>\n')
} else {
str = str.replace(/> /gi,'>\n')
}
str = str.replace(/</gi, '<')