In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-16 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >
Share
Shulou(Shulou.com)05/31 Report--
Most people do not understand the knowledge points of this article "javascript how to modify browser title", so the editor summarizes the following content, detailed content, clear steps, and has a certain reference value. I hope you can get something after reading this article. Let's take a look at this "javascript how to modify browser title" article.
Javascript modify title method: 1, use "document.getElementsByTagName (" title ") [0] .innerText = 'value';" statement to modify. 2. Use the "document.title=' value';" statement to modify.
The operating environment of this tutorial: windows7 system, javascript1.8.5 version, Dell G3 computer.
Title is a special node element in html. Use javascript to modify title? The following article will introduce the method of revision.
Methods 1:innerText mode
Document.getElementsByTagName ("title") [0] .innerText = "value to be set"
Methods 2:document.title mode
After testing, you can also set the value of title through document.title.
Console.log (document.title); # can get the value of title. Document.title = 'value to be set'; # set the value of title.
Examples
_ window.onfocus = function () {document.title = 'normal';}; _ window.onblur = function () {document.title = 'come back ~ the page crashed';}
When we change the value of title when the browser gains focus and loses focus, we can see that title changes when we switch browser tabs.
The above is about the content of this article on "javascript how to modify browser title". I believe we all have some understanding. I hope the content shared by the editor will be helpful to you. If you want to know more about the relevant knowledge, please follow the industry information channel.
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.