基本上,我需要转换一个字符串
"23423,1616,3461743,1345"
到一个字符串
"<img src='23423'></img><img src='1616'></img><img src='3461743'></img><img src='1345'></img>
到目前为止我已经尝试过:
var PhotoArray=JSONeventobject.Events[i].FileNameArray.split(","); // Just convert this string to array for (i = 0; i < PhotoArray.length; i++) { PhotoArray[i] = "<img src='"+PhotoArray[i]+"</img>"; } var Photostring = PhotoArray.toString().replace(",","")
但这会导致我的浏览器崩溃.对于我,这说得通 :/