What's the easiest way to get the URL fragment using JavaScript?
-
If I'm on the page http://www.example.com/something/page.html?x=y&b=3#frag , how can I get "frag" correctly and most easily?
-
Answer:
window.location.hash seems to work. I'm not certain yet if it works in all browsers.
Charlie Cheever at Quora Visit the source
Related Q & A:
- What's the easiest way to scrape residential phone numbers and names into .csv format?Best solution by Quora
- What is the easiest way to get rid of corns?Best solution by Yahoo! Answers
- What's the Easiest way to get money?Best solution by Yahoo! Answers
- What's the easiest way to get a good lightweight BMX bike?Best solution by Yahoo! Answers
- What's the easiest way to study?Best solution by Yahoo! Answers
Just Added Q & A:
- How many active mobile subscribers are there in China?Best solution by Quora
- How to find the right vacation?Best solution by bookit.com
- How To Make Your Own Primer?Best solution by thekrazycouponlady.com
- How do you get the domain & range?Best solution by ChaCha
- How do you open pop up blockers?Best solution by Yahoo! Answers
For every problem there is a solution! Proved by Solucija.
-
Got an issue and looking for advice?
-
Ask Solucija to search every corner of the Web for help.
-
Get workable solutions and helpful tips in a moment.
Just ask Solucija about an issue you face and immediately get a list of ready solutions, answers and tips from other Internet users. We always provide the most suitable and complete answer to your question at the top, along with a few good alternatives below.