Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

get current page name in javascript

“javascript current page name” Code Answer
var path = window. location. pathname;
var page = path. split("/"). pop();
console. log( page );
 
PREVIOUS NEXT
Tagged: #current #page #javascript
ADD COMMENT
Topic
Name
9+6 =