2010年7月15日
摘要: 完整的URL由这几个部分构成:scheme://host:port/path?query#fragment ,各部分的取法如下:window.location.href:获取完整url的方法:,即scheme://host:port/path?query#fragment window.location.protocol:获取rul协议schemewindow.location.host:获取hostwindow.location.port:获取端口号window.location.pathname:获取url路径window.location.search:获取参数query部分,注意此处返 阅读全文
posted @ 2010-07-15 00:44 yanhaidong 阅读(40777) 评论(1) 推荐(2) 编辑