[removed] How to truly reload a site with an anchor tag?

前端 未结 6 2109
遇见更好的自我
遇见更好的自我 2020-12-15 16:27

Take this code snippet for example:

window.location.href = \'mysite.htm#images\';

Already being on the site mysite.htm and tri

6条回答
  •  余生分开走
    2020-12-15 16:53

    You could be a cheater and append a randomized query string, redirecting to "mysite.htm?random=289954034#images".

    But if this is a static page, as .htm implies, what do you need reloading for? If it's so that your onload Javascript can occur a second time, maybe you just need to change your application's flow.

提交回复
热议问题