blog post

Change the title of page using Jquery
Assuming you're using the latest jQuery, To change the page title, so you can use below mention script:

document.title = "New Title";
Or you can use this script to set title using title element.
 $("title").html("").html("New Title");

source Code

<pre class="html">
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <title>Old title</title>
   <script src="//code.jquery.com/jquery-1.11.3.min.js" type="text/javascript"></script>
    <script type="text/javascript">
        $(document).ready(function () {
            $(".oldtitle").html(document.title);


            /* 1. You can use this script to set  page title */
            // document.title = "New Title";

            /*2. You can use this script to set page title */
            $("title").html("").html("New Title");


            $(".newtitle").html(document.title);

        });
    </script>
</head>
<body align="center">
    <h3 class="oldtitle"></h3><br /><br />
    <h3 class="newtitle"></h3>
</body>
</html>


How to change the title of page using Jquery
  • Share This Story


Pleas give your valuable comments to improve the contents.

about author

Atul kumar shukla


I'm Atul Kumar Shukla, working as a web developer.
Welcome to my Blog. This is my personal blog where i post my own questions and answers , articles about ASP.Net., SQL Server, HTML, CSS, Jquery and many more..

Visit Profile

Leave a comment

Name
E-mail
Url
Message

Get More Stuff
Subscribing to the TheOneblogs newsletter and get intersting stuff and updates to your email inbox.
Your Email

 

Style Switcher

Change Color

×! We use cookies to improve your user experience. More information