Search
 
SCRIPT & CODE EXAMPLE
 

JAVASCRIPT

js get home url

var base_url = window.location.origin;
var pathArray = window.location.pathname.split('/');
console.log(base_url + '/' + pathArray[1]);
Comment

PREVIOUS NEXT
Code Example
Javascript :: javascript get base url 
Javascript :: capitalize first letter of every word javascript 
Javascript :: close exit app react native 
Javascript :: expo build android 
Javascript :: detect os javascript 
Javascript :: onMounted 
Javascript :: javascript get utc time 
Javascript :: unsafe value used in a resource URL context 
Javascript :: delete cr eslint 
Javascript :: performance.now nodejs example 
Javascript :: js canvas fill color 
Javascript :: Valid Time javascript 
Javascript :: document ready 
Javascript :: jquery get image src 
Javascript :: verify radio checked jquery 
Javascript :: nodejs server fetch is not defined 
Javascript :: jquery sort select options by text 
Javascript :: how to check nan in jquery 
Javascript :: trigger click jquery 
Javascript :: react router dom 
Javascript :: groupby javascript by instances 
Javascript :: dom get all tags 
Javascript :: reactjs checkbox 
Javascript :: neo4j delete node by id 
Javascript :: install tailwind nextjs 
Javascript :: javascript string to int 
Javascript :: angular get current time 
Javascript :: has decimal javascript 
Javascript :: js add value to html input 
Javascript :: Laravel csrf token mismatch for ajax POST Request 
ADD CONTENT
Topic
Content
Source link
Name
9+9 =