在JavaScript中,可以通過window.location來獲取url地址。但是window.location是一個(gè)對(duì)象,沒有辦法直接從里面獲取出我們需要的參數(shù)。通常的做法就是使用一個(gè)隱藏的<input>,通過將window.location負(fù)值給input。其目的就是為了將location轉(zhuǎn)換成String。寫的過程中總是覺得太復(fù)雜了,后來發(fā)現(xiàn)使用document.URL就可以解決這個(gè)問題。
posted on 2005-04-18 15:52
非飛 閱讀(4100)
評(píng)論(3) 編輯 收藏 所屬分類:
JavaScript相關(guān)技術(shù)