Answer the question
In order to leave comments, you need to log in
How to substitute the value from the url into an already running script?
I am making an online coloring site.
var url is the address of the picture that can be colored. this works great. let's say the address of my service is: krasim.ru/online I will add a button to colorize online, for example, to the pictures on the site. krasim.ru/online?= https://krasim.ru/sobaka.jpg that is, after the question mark there will be the address of the picture question: how to insert the entire value after the "?" i.e. how to cut the link i found. but I don't know how to paste the result there. I will explain using the example var url = window.location.href if I insert it into var url, then when the page loads in the code, I will see var url = window.location.href, and not the result. this is the main snag. How can I insert the result into var url? Thank you
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question