how to set hash url in javascript code example Example: javascript change url hash window.location.hash = '#hash_value';