url.js 从URL中提取信息的工具
url.js从URL中提取信息的工具。 API url.parse var myUrl = url.parse("http://www.demo.com/?a=1"); console.log(myUrl.host); // => "www.demo.com" console.log(myUrl.search); // => "?a=1" url.search var searchData = url.search("http://www.demo.com/?a=1"); // => {a:1} url.hash var hashData = url.hash("http://www.demo.com/?a=1#b=2"); // => {b:2}安装bower install binnng/url.js component install binnn
用户评论