惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

博客园 - 叶小钗
云风的 BLOG
云风的 BLOG
G
Google Developers Blog
S
SegmentFault 最新的问题
罗磊的独立博客
Hugging Face - Blog
Hugging Face - Blog
美团技术团队
爱范儿
爱范儿
博客园 - 三生石上(FineUI控件)
H
Hackread – Cybersecurity News, Data Breaches, AI and More
D
DataBreaches.Net
F
Fortinet All Blogs
TaoSecurity Blog
TaoSecurity Blog
D
Docker
C
Cybersecurity and Infrastructure Security Agency CISA
K
Kaspersky official blog
宝玉的分享
宝玉的分享
腾讯CDC
Google Online Security Blog
Google Online Security Blog
Recorded Future
Recorded Future
T
The Exploit Database - CXSecurity.com
T
The Blog of Author Tim Ferriss
V
V2EX
S
Securelist
K
KPMG report finds enterprise disconnect between AI and its ROI | CIO
C
CERT Recently Published Vulnerability Notes
A
Arctic Wolf
Scott Helme
Scott Helme
L
LINUX DO - 热门话题
Y
Y Combinator Blog
P
Proofpoint News Feed
T
Tor Project blog
AWS News Blog
AWS News Blog
cs.CV updates on arXiv.org
cs.CV updates on arXiv.org
The Last Watchdog
The Last Watchdog
博客园 - 聂微东
T
Threat Research - Cisco Blogs
B
Blog
Attack and Defense Labs
Attack and Defense Labs
L
Lohrmann on Cybersecurity
C
CXSECURITY Database RSS Feed - CXSecurity.com
阮一峰的网络日志
阮一峰的网络日志
cs.AI updates on arXiv.org
cs.AI updates on arXiv.org
IT之家
IT之家
N
News and Events Feed by Topic
博客园 - 司徒正美
H
Help Net Security
C
Cisco Blogs
C
Check Point Blog
S
Secure Thoughts

博客园 - niuyy

博文阅读密码验证 - 博客园 博文阅读密码验证 - 博客园 博文阅读密码验证 - 博客园 .net 中用到excel中,检索COM类工厂中的CLSID为{000 24500-0000-0000-C000-000000000046}的组件时失败 SQL语句中,插入单引号、添加、删除字段 JS给RadioButtonList赋值 在SQL2000中不显示系统表及系统文件 Embed标签详解 可以拖动,关闭的DIV组合 获取计算机用户名 浏览器字体变小 学习小技巧 ComBox 绑定数据库 C# 读取文本文件 字符编码 ComboBox与其他控件的联动 在.net中应用事务 数据库索引应用(ms-sql) 开发人员组要注意的网站 C# 在.cs文件中使用正则表达式
客户端获取传递的参数
niuyy · 2009-07-15 · via 博客园 - niuyy

//获取地址栏参数
function GetUrl(name)
{
    var Url_Params = new Array();
    var aParams = document.location.search.substr(1).split('&');
    for (i=0; i < aParams.length; i++)
    {
        var aParam = aParams[i].split('=');
       Url_Params[aParam[0]] = aParam[1];
    }
    //取得传过来的name参数
    return Url_Params[name];
}

注:document.location.search是获取地址栏中的问号及其以后的字符串的。

如:地址:http://www.baidu.com/aaa.html?ID=298&type=2

document.location.search获取的的结果是"?ID=298&type=2"

aParams [0]="ID=298";

aParams [1]="type=2";

Url_Params的结果是:

Url_Params["ID"]=298

Url_Params["type"]=2

所以GetUrl(“ID”)返回的结果是298,GetUrl(“type”)返回的结果是2。