Tuesday, June 4, 2024
 Popular · Latest · Hot · Upcoming
60
rated 0 times [  63] [ 3]  / answers: 1 / hits: 126126  / 14 Years ago, fri, november 26, 2010, 12:00:00

Is there is a way how to add hash # to my URL without redirect?


More From » jquery

 Answers
50
window.location.hash = 'something';


That is just plain JavaScript.



Your comment...




Hi, what I really need is to add only the hash... something like this: window.location.hash = '#'; but in this way nothing is added.




Try this...



window.location = '#';


Also, don't forget about the window.location.replace() method.


[#94840] Tuesday, November 23, 2010, 14 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
katelynn

Total Points: 378
Total Questions: 86
Total Answers: 108

Location: Azerbaijan
Member since Fri, May 12, 2023
1 Year ago
katelynn questions
Fri, Mar 12, 21, 00:00, 3 Years ago
Mon, Nov 16, 20, 00:00, 4 Years ago
Thu, Jul 23, 20, 00:00, 4 Years ago
Wed, Apr 15, 20, 00:00, 4 Years ago
;