document.lcoation不是string

就如同 arguments 不是陣列一樣,document.location 也不是字串,其實我多少了解這樣設計的原因,不過用起來還是很不方便,要正常的用各種字串的函式要先強制轉換一下:

var loc = document.location + '';