Get the current anchor in javascript

By Anatoly Mironov