I need to be able to get the current URL of my page and store it to a variable. Can someone help me? Thanks, Jeremy
Ex: "http://localhost/StarWeb" I need to get that string and store it in a variable so that I can create dynamic links to webpages.
Printable View
I need to be able to get the current URL of my page and store it to a variable. Can someone help me? Thanks, Jeremy
Ex: "http://localhost/StarWeb" I need to get that string and store it in a variable so that I can create dynamic links to webpages.
Here you go:
Code:var CurURL = location.href
alert(CurURL)
Thanks, works like a charm.