I am looking to get the url of current page in url开发者_如何学Python bar
[BookMark Button In Tool Bar] - User Presses it while on a youtube link and sends it to sitename.com/test.php
The url in the bookmark then prints something like
sitename.com/test.php?url=http://www.youtbe.com/whateverwatever
I tried using referrer bur since it's coming from a bookmark link it won't work I also tried the referrer in Javascript but it still won't work
I believe you just want window.location.href
. That'll get the current location then you can do what you want with it.
You can't do this, as there isn't a referrer if you click a bookmark.
If you're trying to make a "share this" bookmark sort of thing, you can use some JavaScript to make a "bookmarklet". Delicious has a bookmarklet that does this sort of thing.
精彩评论