let pathSeg = window.location.pathname.split('/'); pathSeg.shift(); // 上面已經取得每個路徑的陣列,可以用forEach去執行想要的動作pathSeg.forEach(......) 補充: ...
確定! 回上一頁