For example, I have a URL as :
http://www.google.com/#hash=value2x
I want a js code to return just value2x. I tried
value2x
How about
location.hash.split('hash=')[1].split('&')[0]
This will split the hash at hash= and take the value after hash= and before any other argument .
hash=