javascript 解析url
2012-11-09 01:16
375 查看
方式1:
方式2:
http://code.google.com/p/jsuri/downloads/list
[b]方式3: [/b]
http://medialize.github.com/URI.js/
参考文章:http://www.nowamagic.net/javascript/js_GetUrl.php
<script> var parser = document.createElement('a'); parser.href = "http://example.com:3000/pathname/?search=test#hash"; parser.protocol; // => "http:" parser.hostname; // => "example.com" parser.port; // => "3000" parser.pathname; // => "/pathname/" parser.search; // => "?search=test" parser.hash; // => "#hash" parser.host; // => "example.com:3000" </script>
方式2:
http://code.google.com/p/jsuri/downloads/list
[b]方式3: [/b]
http://medialize.github.com/URI.js/
参考文章:http://www.nowamagic.net/javascript/js_GetUrl.php
相关文章推荐
- JavaScript正则表达式解析URL的技巧
- javascript解析URL中的参数——返回对象
- javascript如何拼接对象属性到url/url如何把参数解析成对象???
- javascript 正则表达式 一个 匹配和解析url的
- 异类的Javascript处理和解析URL的方式
- javascript 解析url的search方法
- 介绍一个前端javascript解析url的库
- Javascript解析URL方法详解
- javascript 解析url的search方法
- Javascript解析URL传递的参数
- 一个非常全面的javascript URL解析函数和分段URL解析方法
- curl 转译url地址为unicode码并前台javascript解析
- javascript 解析url参数(转)
- Javascript解析URL
- 【javascript】利用 a 标签自动解析 url
- JavaScript解析URL参数
- 转-Javascript对URL地址解析为对象的方法
- hash.js Javascript/jQuery 解析/监听url hash
- 异类的Javascript处理和解析URL的方式
- Javascript解析URL的方法