Search
 
SCRIPT & CODE EXAMPLE
 

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 );
Comment

PREVIOUS NEXT
Code Example
Javascript :: jquery last character in string 
Javascript :: discord.js kick user 
Javascript :: javascript get device gpu info 
Javascript :: js random string 
Javascript :: jquery ajax post form 
Javascript :: for of get index 
Javascript :: sequelize like search 
Javascript :: javascript foreach get key and value 
Javascript :: javascript change string at particular index 
Javascript :: jquery checkbox set checked 
Javascript :: selected option attribute jquery 
Javascript :: javascript get body height 
Javascript :: nodemailer gmail example 
Javascript :: js change url 
Javascript :: align left text in reactstrap 
Javascript :: window loaded vanilla javascript 
Javascript :: reactdom is not defined 
Javascript :: onload javascript function call 
Javascript :: console.log formdata 
Javascript :: if document is loaded 
Javascript :: react material ui button router link 
Javascript :: get child element by class javascript 
Javascript :: javascript add day to date 
Javascript :: js generate random boolean 
Javascript :: jquery on click get element 
Javascript :: javascript multiply arguments 
Javascript :: javascript pad number with leading zeros 
Javascript :: nodejs copy to clipboard 
Javascript :: javascript change class of item 
Javascript :: angular generate guid 
ADD CONTENT
Topic
Content
Source link
Name
2+3 =