标签:
<script language="javascript">
str="2,2,3,5,6,6"; //这是一字符串
var strs= new Array(); //定义一数组
strs=str.split(","); //字符分割
for (i=0;i<strs.length ;i++ )
{
document.write(strs[i]+"<br/>"); //分割后的字符输出
}
</script>
标签:
原文地址:http://www.cnblogs.com/dlf-myDream/p/4802700.html