js获取当前网址Url

js获取当前路径并截取

var str = window.location.href;// str = 'https://localhost:8080/mark'
var index = str .lastIndexOf(":"); str = str .substring(,index + );

  console.log(str);//结果为:https://localhost:

上一篇:asp.net获取当前网址url【转】


下一篇:Archlinux添加MP3播放器