如何使用JavaScript更改标题 [英] How to change the title using JavaScript

查看:65
本文介绍了如何使用JavaScript更改标题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想使用标题类似的Javascript更改HTML文件的标题,


(文档的h1标签)+" Text"

解决方案

到目前为止您尝试了什么?


当您想要更改标题时。如果文件就绪事件或其他事件?


我试过了


document.title = document.GetItemByTagName(" h1")+" ;文本英寸;

I want to change the title of HTML file using Javascript that the title will be like,

(the h1 tag of the document)+"Text"

解决方案

what have you tried so far?


When You want to change the title. If the Document ready event or another event?


I have tried

document.title = document.GetItemByTagName("h1") + "Text";


这篇关于如何使用JavaScript更改标题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆