in ,

🧑🏻‍💻 TechAcademy | How to get / change the pathname of URL using location.pathname property in JavaScript

How to get / change URL pathname using location.pathname property in JavaScript

TechAcademy mentors (active engineers) will explain for beginners how to get and change URL pathnames using the location.pathname property in JavaScript using real code.

If you don't understand JavaScript well,What is JavaScriptFirst of all, please see the article explaining what it is.

 

In addition, this article is an online boot camp of Tech Academy,JavaScript/jQuery courseIt is based on the contents of.

 

 

What is a URL pathname?

The pathname of the URL is the part of the URL that indicates the location of the file.

For example, if you have the URL "https://abc.com/aaa/bbb/ccc.html", the pathname will be "/aaa/bbb/ccc.html".

What is the location.pathname property?

The location.pathname property allows you to see the pathname of the current page.

[PR]...

→See more in Tech Tech Magazine