如何使用 JavaScript 获取 HTML 页面的标题?
最佳答案
使用document.title:
document.title
console.log(document.title)
<title>Title test</title>
MDN Web Docs
https://stackoverflow.com/questions/1057059/
相关文章:
html - 标签中是否需要 ="text/css"类型?
html - 如何保存 Chrome 开发者工具样式面板的 CSS 更改?
html - 设置表格列宽
html - 在 HTML 中呈现字符串并保留空格和换行符
javascript - 从 onclick/onchange 事件中获取 HTML Checkbo
html - 在 Notepad++ 中格式化代码
html - 并排的两个 div - 流体显示
html - 当鼠标移过表格中的一行时将光标更改为手形
html - 如何用固定宽度换行 HTML 按钮的文本?
email - 使电子邮件地址免受网页上的机器人攻击?