Adding a random number after the URL

前端 未结 5 2076
挽巷
挽巷 2021-01-07 02:43

I\'ve got a site which uses jQuery and Ajax to change the site content without reloading the page. The site contains content which I often change. But somehow the page gets

5条回答
  •  借酒劲吻你
    2021-01-07 03:31

    window.location.hash = $(this).attr('href')
                                .substr(0,$(this).attr('href').length-5)
                                + Math.random();
    

提交回复
热议问题