How to change the title of page through jQuery?

前端 未结 7 858
时光取名叫无心
时光取名叫无心 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:21

    In pure JavaScript:

    document.title = "Insert title here";
    

    the document should be fully loaded before you change it.

    Reference: Document.Title at Mozilla Developer Central

提交回复
热议问题