Remove URL parameters without refreshing page

前端 未结 13 1003
执念已碎
执念已碎 2020-12-07 08:00

I am trying to remove everything after the \"?\" in the browser url on document ready.

Here is what I am trying:

jQuery(document).ready(function($)          


        
13条回答
  •  渐次进展
    2020-12-07 08:13

    Better solution :

    window.history.pushState(null, null, window.location.pathname);
    

提交回复
热议问题