var x = "txt,docx";怎么遍历输出 txt docx
arr=x.split(",")
数组arr里头就是txt、docx两个值
x.replace(","," ");
var x ="txt,docx";
var arr=x.split(',');
for(var item of arr){console.log(item);}