Answer the question
In order to leave comments, you need to log in
How to pass text from the address bar to a variable?
You need to get the text from the address bar https://localhost/#2021
. How to get 2021?
Answer the question
In order to leave comments, you need to log in
window.location.hash will get #2021 and window.location.hash.substring(1) method will get 2021
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question