陣列:
var arrA = new Array(); //宣告陣列
split:
1、在本例中,我們將依照不同的方式來分割字串: "text/javascript"> var str="How are you doing today?" var str="How are you doing today?" document.write(str.split(" ") + "
")+strdocument. br />") document.write(str.split(" ",3))
輸出:
How,areday,doing ,r,e, ,y,o,u, ,d,o,i,n,g, ,t,o,d,a,y,? How,are,you
2、當要把文件路徑以「」分割成陣列時,需要這樣寫
split1= myFile.toString().split("\");------------ --------------------把檔名以「」區分
alert(split1[0]);