用javascript获得URL传递的参数

function QueryString(item)
{
    var sValue
=location.search.match(new RegExp("[\?\&]"+item+"=([^\&]*)(\&?)","i"))
   
return sValue?sValue[1]:sValue
}

这个感觉很有用。
posted @ 2007-07-23 15:24  fishert  阅读(263)  评论(0)    收藏  举报