split() 方法用於把一個字符串分割成字符串數組。
let str = "https://www.hao123.com/";
let result = str.split('.');
console.log(result);
結果:
PS:與php中explode函數是一樣的性質,把字符串按條件切割成數組
split() 方法用於把一個字符串分割成字符串數組。
let str = "https://www.hao123.com/";
let result = str.split('.');
console.log(result);
結果:
PS:與php中explode函數是一樣的性質,把字符串按條件切割成數組
https://view.officeapps.live.com/op/view.aspx?src=你地址