JS无刷新修改URL类似博客园翻页效果

1
2
3
4
5
6
7
<script type="text/javascript">
    function changeURL(){
        var url = document.getElementById('url').value;
        window.history.pushState({},0,'http://'+window.location.host+'/'+url);     
    }
 
</script>

posted @   Adtuu  阅读(316)  评论(0编辑  收藏  举报
点击右上角即可分享
微信分享提示