简体   繁体   中英

Override <title>TITLE</title> through Header

Is there a way I could override the title of my page, which I cannot edit directly, only adding Javascript in the header?

The line I cannot directly edit is:

<title>Title of the page</title>

The only way I can imagine solving this is inserting a Javascript command in the Header file that I can upload through the backend of my portal. This, I've been told, accepts Javascript.

Thank you for your help!

You can set document.title :

document.title = "This Is A New Title!";

You can put that in a <script> tag just about anywhere.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM