Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我目前有一个网站,其中一个 div 通过 Javascript 更新为另一个页面上相同 div 的内容,允许网页之间的无缝过渡,但是如何使网页的标题更新为新的标题网页?
进一步澄清:我知道如何更改网页的标题,但是如何获取指定网页的标题?
您可以获取/设置document.title.
document.title
document.title = "New Title For Page";
var newWindow = window.open("www.site.com","Title","options..."); newWindow.title = "rename here";