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

推荐订阅源

T
The Exploit Database - CXSecurity.com
A
Arctic Wolf
K
Kaspersky official blog
T
Threat Research - Cisco Blogs
PCI Perspectives
PCI Perspectives
www.infosecurity-magazine.com
www.infosecurity-magazine.com
P
Privacy International News Feed
K
KPMG report finds enterprise disconnect between AI and its ROI | CIO
U
Unit 42
cs.CL updates on arXiv.org
cs.CL updates on arXiv.org
Simon Willison's Weblog
Simon Willison's Weblog
P
Privacy & Cybersecurity Law Blog
O
OpenAI News
量子位
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
C
Cisco Blogs
AWS News Blog
AWS News Blog
Vercel News
Vercel News
Microsoft Security Blog
Microsoft Security Blog
Threat Intelligence Blog | Flashpoint
Threat Intelligence Blog | Flashpoint
美团技术团队
T
Threatpost
S
Schneier on Security
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
C
Cyber Attacks, Cyber Crime and Cyber Security
Last Week in AI
Last Week in AI
C
CERT Recently Published Vulnerability Notes
Blog — PlanetScale
Blog — PlanetScale
C
Cybersecurity and Infrastructure Security Agency CISA
F
Full Disclosure
博客园_首页
N
Netflix TechBlog - Medium
Security Latest
Security Latest
有赞技术团队
有赞技术团队
Google DeepMind News
Google DeepMind News
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
The Register - Security
The Register - Security
Application and Cybersecurity Blog
Application and Cybersecurity Blog
Recent Announcements
Recent Announcements
博客园 - Franky
P
Palo Alto Networks Blog
Project Zero
Project Zero
CTFtime.org: upcoming CTF events
CTFtime.org: upcoming CTF events
H
Help Net Security
Hacker News: Ask HN
Hacker News: Ask HN
Cisco Talos Blog
Cisco Talos Blog
H
Heimdal Security Blog
The Hacker News
The Hacker News
博客园 - 【当耐特】
GbyAI
GbyAI

博客园 - 蔡春升

Oracle 取余取整函数 生活永远这样,在自己放松自己的时候,会让你摔个跟头,忍耐生老练,老练生盼望 IE里Iframe的Cookie问题解决办法总结(转) js 代码分析工具 QR code 二维条码 再读王永庆卖米的故事 彼得林奇 投资方法 如何访问google docs 社会化网络观后感 mysql ExecuteReader问题 互联网广告形式 概念过滤 用PDCA培养数据收集整理分析能力 韩寒:请放过我们的食油 精准化技术在互动营销中的应用 oracle 统计某个表的列数 IComparer<T> 安装WAMP怎么测试shopex 常见的WAMP集成环境
js 获取request的方法
蔡春升 · 2011-05-16 · via 博客园 - 蔡春升

通过获取url串, 然后解析“?”之后的数据。

01    function QueryString()
02    {
03        //构造参数对象并初始化
04       var name,value,i;
05        var str=location.href;//获得浏览器地址栏URL串
06       var num=str.indexOf("?")
07        str=str.substr(num+1);//截取“?”后面的参数串
08       var arrtmp=str.split("&");//将各参数分离形成参数数组
09       for(i=0;i < arrtmp.length;i++)
10        {
11            num=arrtmp[i].indexOf("=");
12            if(num>0)
13            {
14                name=arrtmp[i].substring(0,num);//取得参数名称
15                value=arrtmp[i].substr(num+1);//取得参数值
16               this[name]=value;//定义对象属性并初始化
17           }
18        }
19    }  
20     
21    //调用:
22    var abc = new QueryString();
23    alert(abc.id);//id是假如参数名称中有这个变量名

 参考:

http://jeremy.esearchs.com/index.php/archives/257.html