How to change the title of page through jQuery?

前端 未结 7 893
时光取名叫无心
时光取名叫无心 2020-12-20 11:04

I want to change the title of page dynamically. I have lots of AJAX request going on in my page. On each type of response I want to notify this using the title.

7条回答
  •  太阳男子
    2020-12-20 11:30

    document.title = "newtitle" 
    

    is the only valid way as far as I know. manipulating

    $("title") 
    

    will fail on IE8.

    There are subtle differences between the title tag and document.title, it appears browsers treat them differently.

提交回复
热议问题