javascript change url hash

JavaScript
window.location.hash = '#hash_value';
Source

Also in JavaScript: