有此项目要用javascript实现C#中QueryString方法,我从网上找了个例子,但不太好用,就自己改了改,项目中用了很多了,应该是没问题了。
QueryString
function QueryString(key)
{
var URLParams = new Array();
var Paras = document.location.search.substr(1).split('&');
for(var index = 0 ;index < Paras.length;index++)
{
var Para = Paras[index].split('=');
URLParams[Para[0]] = Para[1];
}
return URLParams[key];
}
posted on
2009-08-28 21:23
lanbo
阅读(
437)
评论()
编辑
收藏
举报