摘要:
问题描述(web前端开发附加题1):编写一个javascript的函数把url解析为与页面的javascript.location对象相似的实体对象,如:url :'http://www.qq.com/index.html?key1=1&key2=2',最后输出的对象是:{ protocol: "http", hostname: "www.qq.com", pathname: "index.html", query: "key1=1&key2=2"}我的答案: 1 var myloc 阅读全文