window.location.search的用法

location.search是从当前URL的?号开始的字符串
如:http://www.51js.com/viewthread.php?tid=22720
它的search就是?tid=22720

要获取完整的地址
var url = window.location.search.substring(1,location.search.length);
posted @ 2006-08-18 12:52  MSDI  阅读(10839)  评论(4编辑  收藏  举报