baniol
3/17/2014 - 7:54 AM

get base from a url

get base from a url

var loc = location.href;
var baseurl = loc.substring(0,loc.lastIndexOf('/'));