Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

js get path from url

var reg = /.+?://.+?(/.+?)(?:#|?|$)/;
var pathname = reg.exec( 'http://www.somedomain.com/account/search?filter=a#top' )[1];
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #js #path #url
ADD COMMENT
Topic
Name
2+8 =