- <!doctype html>
- <html>
- <head>
- <meta charset="utf-8">
- <title>Javacript GET</title>
- <script type="text/javascript">
- eval("var _GET=new Array();var URI=location.href;var url=URI.substr(URI.indexOf('?')+1,URI.length-URI.indexOf('?'));url=url.split('&');for(var k in url){_GET[url[k].substr(0,url[k].indexOf('='))]=decodeURI(url[k].substr(url[k].indexOf('=')+1,url[k].length));}_GET=_GET?_GET:null;");
- </script>
- </head>
- <body>
- <script type="text/javascript">document.write(_GET['id']);</script>
- </body>
- </html>
- //该片段来自于http://www.codesnippet.cn/detail/090720134507.html
来源: http://www.codesnippet.cn/detail/090720134507.html