的url窗口里,怎么获取加载页面的title

2024-11-20 11:48:09
推荐回答(1个)
回答1:

var titleElem = document.getElementById("title");
window.addEventListener("updateHeader", function(e) {
var title = e.detail.title;
titleElem.innerHTML = title;
});