获取一个地址的信息

   有一种取巧的方式:

  

function getLocation (href) {
  var l = document.createElement('a');
  l.href = href;
  return l;
}

猜你喜欢

转载自zhangyaochun.iteye.com/blog/2361402