Page title is not changed by history.pushState

后端 未结 4 1312
一个人的身影
一个人的身影 2021-02-03 20:01

I\'ve just opened a blank HTML page with some little amount of base tags (like html, body, head, etc) in Google Chrome, and tried to execute the following command in console:

4条回答
  •  盖世英雄少女心
    2021-02-03 20:39

    Following code will change the page title when you use history.pushState

    $(document).prop('title','your page title');
    

    It is working with IE also.

提交回复
热议问题