ghx88
JavaScript 读取地址栏参数
Code
<
script type
=
"
text/javascript
"
>
Request
=
{
QueryString :
function
(item){
var
svalue
=
location.search.match(
new
RegExp(
"
[\?\&]
"
+
item
+
"
=([^\&]*)(\&?)
"
,
"
i
"
));
return
svalue
?
svalue[
1
] : svalue;
}
}
alert(Request.QueryString(
"
id
"
));
<
/
script>
posted on
2008-10-21 09:12
ghx88
阅读(317) 评论(
0
)
编辑
收藏
刷新评论
刷新页面
返回顶部
程序员问答社区,解决您的IT难题
博客园首页
博问
新闻
闪存
程序员招聘
知识库
My Links
博客园
首页
新随笔
联系
订阅
管理
Blog Stats
随笔 - 113
文章 - 30
评论 - 71
Trackbacks - 4
News
Powered by:
博客园
Copyright © ghx88