I want to pass info to a page in the URL eg. https://www.my_website.co.uk/apage.php?Price=20 , but then use JS / AJAX to collect the info i.e. 20 and assign it to a variable which then allows me to do some maths on it. I am familiar in doing this with PHP using GET but really struggling to achieve the same thing using Jarva Script. Pls be gentle this is only the second JS project i'm working on!
Asked
Active
Viewed 10 times
1
-
Actually getting closer, just found this answer var currentLocation = window.location; or modify to var currentLocation = window.search; – Ross Jun 03 '20 at 21:00