Because my dynamic title is not displayed correctly?












0














I have a question about my JS test code. I need it to show each interval of 1500 the next character, but for some reason I do not see where they are automatically multiplied, until the browser is bugged. I share the code here:



<title>Minuevotitulodeprueba</title>
<script type="text/javascript">
var i=1;
var LegitTitle = document.title;
function ChangeTitle(){
document.title = LegitTitle.substring(0,i);
i++;
if(i>LegitTitle.length)
i = 0;
setInterval('ChangeTitle()',1500);
}
ChangeTitle()
</script>


I am a new developer I beg for mercy xdd










share|improve this question






















  • issue with your code is you used setInterval when you should have use setTimeout.
    – epascarello
    Nov 12 at 14:43
















0














I have a question about my JS test code. I need it to show each interval of 1500 the next character, but for some reason I do not see where they are automatically multiplied, until the browser is bugged. I share the code here:



<title>Minuevotitulodeprueba</title>
<script type="text/javascript">
var i=1;
var LegitTitle = document.title;
function ChangeTitle(){
document.title = LegitTitle.substring(0,i);
i++;
if(i>LegitTitle.length)
i = 0;
setInterval('ChangeTitle()',1500);
}
ChangeTitle()
</script>


I am a new developer I beg for mercy xdd










share|improve this question






















  • issue with your code is you used setInterval when you should have use setTimeout.
    – epascarello
    Nov 12 at 14:43














0












0








0







I have a question about my JS test code. I need it to show each interval of 1500 the next character, but for some reason I do not see where they are automatically multiplied, until the browser is bugged. I share the code here:



<title>Minuevotitulodeprueba</title>
<script type="text/javascript">
var i=1;
var LegitTitle = document.title;
function ChangeTitle(){
document.title = LegitTitle.substring(0,i);
i++;
if(i>LegitTitle.length)
i = 0;
setInterval('ChangeTitle()',1500);
}
ChangeTitle()
</script>


I am a new developer I beg for mercy xdd










share|improve this question













I have a question about my JS test code. I need it to show each interval of 1500 the next character, but for some reason I do not see where they are automatically multiplied, until the browser is bugged. I share the code here:



<title>Minuevotitulodeprueba</title>
<script type="text/javascript">
var i=1;
var LegitTitle = document.title;
function ChangeTitle(){
document.title = LegitTitle.substring(0,i);
i++;
if(i>LegitTitle.length)
i = 0;
setInterval('ChangeTitle()',1500);
}
ChangeTitle()
</script>


I am a new developer I beg for mercy xdd







javascript title






share|improve this question













share|improve this question











share|improve this question




share|improve this question










asked Nov 12 at 14:22









McGyver

33




33












  • issue with your code is you used setInterval when you should have use setTimeout.
    – epascarello
    Nov 12 at 14:43


















  • issue with your code is you used setInterval when you should have use setTimeout.
    – epascarello
    Nov 12 at 14:43
















issue with your code is you used setInterval when you should have use setTimeout.
– epascarello
Nov 12 at 14:43




issue with your code is you used setInterval when you should have use setTimeout.
– epascarello
Nov 12 at 14:43












3 Answers
3






active

oldest

votes


















0














There are two issues with your code




  1. The first parameter to the setInterval function shouldn't be a string, but a function --> setInterval(ChangeTitle,1500);. It would work though with the string (expression) version, but that is not recommended.

  2. You shouldn't use the setInterval inside a function that itself is called itself in the setInterval unless you know what you are doing


Put it outside of the function ...






var i = 1;
var LegitTitle = document.title;
function ChangeTitle(){
document.title = LegitTitle.substring(0,i);
i++;
if (i > LegitTitle.length) {
i = 0;
}
console.log(document.title)
}

setInterval(ChangeTitle,1500);

<title>Minuevotitulodeprueba</title>





... or alternatively use setTimeout instead of setInterval






var i = 1;
var LegitTitle = document.title;
function ChangeTitle(){
document.title = LegitTitle.substring(0,i);
i++;
if (i > LegitTitle.length) {
i = 0;
}
console.log(document.title)

setTimeout(ChangeTitle, 1500);
}

ChangeTitle()

<title>Minuevotitulodeprueba</title>








share|improve this answer























  • I was a bit surprised too, but the string actually worked too when i tried it.
    – Mark Baijens
    Nov 12 at 14:34






  • 1




    Oh yeah, you can have an expression string which will be evaluated, but that should be avoided since eval ist evil
    – HerrSerker
    Nov 12 at 14:36










  • Amen to that :)
    – Mark Baijens
    Nov 12 at 14:37










  • Without a doubt you solved my doubts! Thanks dude
    – McGyver
    Nov 12 at 14:47



















0














Only issue you had is you used setInterval instead of setTimeout... Simple swap and the code works fine.






var i = 1;
var LegitTitle = document.title;

function ChangeTitle() {
document.title = LegitTitle.substring(0, i);
console.log(document.title)
i++;
if (i > LegitTitle.length)
i = 0;
setTimeout('ChangeTitle()', 1500);
}
ChangeTitle()

<title>Minuevotitulodeprueba</title>








share|improve this answer





























    0














    You set a new interval each time you call the function, but the iteration calls the function on an interval not a timeout. Therefore you can avoid this problem by declaring the iteration outside of the function call.






    var i=1;
    var LegitTitle = document.title;
    function ChangeTitle(){

    document.title = LegitTitle.substring(0,i);

    if(i>LegitTitle.length) {
    i = 0;
    }
    console.log('i = ' + i);
    console.log('Title = ' + document.title);
    i++;
    }
    ChangeTitle();
    setInterval(ChangeTitle,1500);

    <title>Minuevotitulodeprueba</title>








    share|improve this answer























    • That worked for me, but not exactly as I wanted, it shows the full title at the beginning. Just modify the position of the "i" and it seems to be displayed correctly, thank you very much experts!
      – McGyver
      Nov 12 at 14:41












    • @McGyver please accept the best answer so people will see that your problem is solved.
      – Mark Baijens
      Nov 12 at 15:03










    • You can do a normal function call on window.onload to change the title immediately.
      – Mark Baijens
      Nov 12 at 15:07











    Your Answer






    StackExchange.ifUsing("editor", function () {
    StackExchange.using("externalEditor", function () {
    StackExchange.using("snippets", function () {
    StackExchange.snippets.init();
    });
    });
    }, "code-snippets");

    StackExchange.ready(function() {
    var channelOptions = {
    tags: "".split(" "),
    id: "1"
    };
    initTagRenderer("".split(" "), "".split(" "), channelOptions);

    StackExchange.using("externalEditor", function() {
    // Have to fire editor after snippets, if snippets enabled
    if (StackExchange.settings.snippets.snippetsEnabled) {
    StackExchange.using("snippets", function() {
    createEditor();
    });
    }
    else {
    createEditor();
    }
    });

    function createEditor() {
    StackExchange.prepareEditor({
    heartbeatType: 'answer',
    autoActivateHeartbeat: false,
    convertImagesToLinks: true,
    noModals: true,
    showLowRepImageUploadWarning: true,
    reputationToPostImages: 10,
    bindNavPrevention: true,
    postfix: "",
    imageUploader: {
    brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
    contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
    allowUrls: true
    },
    onDemand: true,
    discardSelector: ".discard-answer"
    ,immediatelyShowMarkdownHelp:true
    });


    }
    });














    draft saved

    draft discarded


















    StackExchange.ready(
    function () {
    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53264157%2fbecause-my-dynamic-title-is-not-displayed-correctly%23new-answer', 'question_page');
    }
    );

    Post as a guest















    Required, but never shown

























    3 Answers
    3






    active

    oldest

    votes








    3 Answers
    3






    active

    oldest

    votes









    active

    oldest

    votes






    active

    oldest

    votes









    0














    There are two issues with your code




    1. The first parameter to the setInterval function shouldn't be a string, but a function --> setInterval(ChangeTitle,1500);. It would work though with the string (expression) version, but that is not recommended.

    2. You shouldn't use the setInterval inside a function that itself is called itself in the setInterval unless you know what you are doing


    Put it outside of the function ...






    var i = 1;
    var LegitTitle = document.title;
    function ChangeTitle(){
    document.title = LegitTitle.substring(0,i);
    i++;
    if (i > LegitTitle.length) {
    i = 0;
    }
    console.log(document.title)
    }

    setInterval(ChangeTitle,1500);

    <title>Minuevotitulodeprueba</title>





    ... or alternatively use setTimeout instead of setInterval






    var i = 1;
    var LegitTitle = document.title;
    function ChangeTitle(){
    document.title = LegitTitle.substring(0,i);
    i++;
    if (i > LegitTitle.length) {
    i = 0;
    }
    console.log(document.title)

    setTimeout(ChangeTitle, 1500);
    }

    ChangeTitle()

    <title>Minuevotitulodeprueba</title>








    share|improve this answer























    • I was a bit surprised too, but the string actually worked too when i tried it.
      – Mark Baijens
      Nov 12 at 14:34






    • 1




      Oh yeah, you can have an expression string which will be evaluated, but that should be avoided since eval ist evil
      – HerrSerker
      Nov 12 at 14:36










    • Amen to that :)
      – Mark Baijens
      Nov 12 at 14:37










    • Without a doubt you solved my doubts! Thanks dude
      – McGyver
      Nov 12 at 14:47
















    0














    There are two issues with your code




    1. The first parameter to the setInterval function shouldn't be a string, but a function --> setInterval(ChangeTitle,1500);. It would work though with the string (expression) version, but that is not recommended.

    2. You shouldn't use the setInterval inside a function that itself is called itself in the setInterval unless you know what you are doing


    Put it outside of the function ...






    var i = 1;
    var LegitTitle = document.title;
    function ChangeTitle(){
    document.title = LegitTitle.substring(0,i);
    i++;
    if (i > LegitTitle.length) {
    i = 0;
    }
    console.log(document.title)
    }

    setInterval(ChangeTitle,1500);

    <title>Minuevotitulodeprueba</title>





    ... or alternatively use setTimeout instead of setInterval






    var i = 1;
    var LegitTitle = document.title;
    function ChangeTitle(){
    document.title = LegitTitle.substring(0,i);
    i++;
    if (i > LegitTitle.length) {
    i = 0;
    }
    console.log(document.title)

    setTimeout(ChangeTitle, 1500);
    }

    ChangeTitle()

    <title>Minuevotitulodeprueba</title>








    share|improve this answer























    • I was a bit surprised too, but the string actually worked too when i tried it.
      – Mark Baijens
      Nov 12 at 14:34






    • 1




      Oh yeah, you can have an expression string which will be evaluated, but that should be avoided since eval ist evil
      – HerrSerker
      Nov 12 at 14:36










    • Amen to that :)
      – Mark Baijens
      Nov 12 at 14:37










    • Without a doubt you solved my doubts! Thanks dude
      – McGyver
      Nov 12 at 14:47














    0












    0








    0






    There are two issues with your code




    1. The first parameter to the setInterval function shouldn't be a string, but a function --> setInterval(ChangeTitle,1500);. It would work though with the string (expression) version, but that is not recommended.

    2. You shouldn't use the setInterval inside a function that itself is called itself in the setInterval unless you know what you are doing


    Put it outside of the function ...






    var i = 1;
    var LegitTitle = document.title;
    function ChangeTitle(){
    document.title = LegitTitle.substring(0,i);
    i++;
    if (i > LegitTitle.length) {
    i = 0;
    }
    console.log(document.title)
    }

    setInterval(ChangeTitle,1500);

    <title>Minuevotitulodeprueba</title>





    ... or alternatively use setTimeout instead of setInterval






    var i = 1;
    var LegitTitle = document.title;
    function ChangeTitle(){
    document.title = LegitTitle.substring(0,i);
    i++;
    if (i > LegitTitle.length) {
    i = 0;
    }
    console.log(document.title)

    setTimeout(ChangeTitle, 1500);
    }

    ChangeTitle()

    <title>Minuevotitulodeprueba</title>








    share|improve this answer














    There are two issues with your code




    1. The first parameter to the setInterval function shouldn't be a string, but a function --> setInterval(ChangeTitle,1500);. It would work though with the string (expression) version, but that is not recommended.

    2. You shouldn't use the setInterval inside a function that itself is called itself in the setInterval unless you know what you are doing


    Put it outside of the function ...






    var i = 1;
    var LegitTitle = document.title;
    function ChangeTitle(){
    document.title = LegitTitle.substring(0,i);
    i++;
    if (i > LegitTitle.length) {
    i = 0;
    }
    console.log(document.title)
    }

    setInterval(ChangeTitle,1500);

    <title>Minuevotitulodeprueba</title>





    ... or alternatively use setTimeout instead of setInterval






    var i = 1;
    var LegitTitle = document.title;
    function ChangeTitle(){
    document.title = LegitTitle.substring(0,i);
    i++;
    if (i > LegitTitle.length) {
    i = 0;
    }
    console.log(document.title)

    setTimeout(ChangeTitle, 1500);
    }

    ChangeTitle()

    <title>Minuevotitulodeprueba</title>








    var i = 1;
    var LegitTitle = document.title;
    function ChangeTitle(){
    document.title = LegitTitle.substring(0,i);
    i++;
    if (i > LegitTitle.length) {
    i = 0;
    }
    console.log(document.title)
    }

    setInterval(ChangeTitle,1500);

    <title>Minuevotitulodeprueba</title>





    var i = 1;
    var LegitTitle = document.title;
    function ChangeTitle(){
    document.title = LegitTitle.substring(0,i);
    i++;
    if (i > LegitTitle.length) {
    i = 0;
    }
    console.log(document.title)
    }

    setInterval(ChangeTitle,1500);

    <title>Minuevotitulodeprueba</title>





    var i = 1;
    var LegitTitle = document.title;
    function ChangeTitle(){
    document.title = LegitTitle.substring(0,i);
    i++;
    if (i > LegitTitle.length) {
    i = 0;
    }
    console.log(document.title)

    setTimeout(ChangeTitle, 1500);
    }

    ChangeTitle()

    <title>Minuevotitulodeprueba</title>





    var i = 1;
    var LegitTitle = document.title;
    function ChangeTitle(){
    document.title = LegitTitle.substring(0,i);
    i++;
    if (i > LegitTitle.length) {
    i = 0;
    }
    console.log(document.title)

    setTimeout(ChangeTitle, 1500);
    }

    ChangeTitle()

    <title>Minuevotitulodeprueba</title>






    share|improve this answer














    share|improve this answer



    share|improve this answer








    edited Nov 12 at 15:31

























    answered Nov 12 at 14:28









    HerrSerker

    19.8k84778




    19.8k84778












    • I was a bit surprised too, but the string actually worked too when i tried it.
      – Mark Baijens
      Nov 12 at 14:34






    • 1




      Oh yeah, you can have an expression string which will be evaluated, but that should be avoided since eval ist evil
      – HerrSerker
      Nov 12 at 14:36










    • Amen to that :)
      – Mark Baijens
      Nov 12 at 14:37










    • Without a doubt you solved my doubts! Thanks dude
      – McGyver
      Nov 12 at 14:47


















    • I was a bit surprised too, but the string actually worked too when i tried it.
      – Mark Baijens
      Nov 12 at 14:34






    • 1




      Oh yeah, you can have an expression string which will be evaluated, but that should be avoided since eval ist evil
      – HerrSerker
      Nov 12 at 14:36










    • Amen to that :)
      – Mark Baijens
      Nov 12 at 14:37










    • Without a doubt you solved my doubts! Thanks dude
      – McGyver
      Nov 12 at 14:47
















    I was a bit surprised too, but the string actually worked too when i tried it.
    – Mark Baijens
    Nov 12 at 14:34




    I was a bit surprised too, but the string actually worked too when i tried it.
    – Mark Baijens
    Nov 12 at 14:34




    1




    1




    Oh yeah, you can have an expression string which will be evaluated, but that should be avoided since eval ist evil
    – HerrSerker
    Nov 12 at 14:36




    Oh yeah, you can have an expression string which will be evaluated, but that should be avoided since eval ist evil
    – HerrSerker
    Nov 12 at 14:36












    Amen to that :)
    – Mark Baijens
    Nov 12 at 14:37




    Amen to that :)
    – Mark Baijens
    Nov 12 at 14:37












    Without a doubt you solved my doubts! Thanks dude
    – McGyver
    Nov 12 at 14:47




    Without a doubt you solved my doubts! Thanks dude
    – McGyver
    Nov 12 at 14:47













    0














    Only issue you had is you used setInterval instead of setTimeout... Simple swap and the code works fine.






    var i = 1;
    var LegitTitle = document.title;

    function ChangeTitle() {
    document.title = LegitTitle.substring(0, i);
    console.log(document.title)
    i++;
    if (i > LegitTitle.length)
    i = 0;
    setTimeout('ChangeTitle()', 1500);
    }
    ChangeTitle()

    <title>Minuevotitulodeprueba</title>








    share|improve this answer


























      0














      Only issue you had is you used setInterval instead of setTimeout... Simple swap and the code works fine.






      var i = 1;
      var LegitTitle = document.title;

      function ChangeTitle() {
      document.title = LegitTitle.substring(0, i);
      console.log(document.title)
      i++;
      if (i > LegitTitle.length)
      i = 0;
      setTimeout('ChangeTitle()', 1500);
      }
      ChangeTitle()

      <title>Minuevotitulodeprueba</title>








      share|improve this answer
























        0












        0








        0






        Only issue you had is you used setInterval instead of setTimeout... Simple swap and the code works fine.






        var i = 1;
        var LegitTitle = document.title;

        function ChangeTitle() {
        document.title = LegitTitle.substring(0, i);
        console.log(document.title)
        i++;
        if (i > LegitTitle.length)
        i = 0;
        setTimeout('ChangeTitle()', 1500);
        }
        ChangeTitle()

        <title>Minuevotitulodeprueba</title>








        share|improve this answer












        Only issue you had is you used setInterval instead of setTimeout... Simple swap and the code works fine.






        var i = 1;
        var LegitTitle = document.title;

        function ChangeTitle() {
        document.title = LegitTitle.substring(0, i);
        console.log(document.title)
        i++;
        if (i > LegitTitle.length)
        i = 0;
        setTimeout('ChangeTitle()', 1500);
        }
        ChangeTitle()

        <title>Minuevotitulodeprueba</title>








        var i = 1;
        var LegitTitle = document.title;

        function ChangeTitle() {
        document.title = LegitTitle.substring(0, i);
        console.log(document.title)
        i++;
        if (i > LegitTitle.length)
        i = 0;
        setTimeout('ChangeTitle()', 1500);
        }
        ChangeTitle()

        <title>Minuevotitulodeprueba</title>





        var i = 1;
        var LegitTitle = document.title;

        function ChangeTitle() {
        document.title = LegitTitle.substring(0, i);
        console.log(document.title)
        i++;
        if (i > LegitTitle.length)
        i = 0;
        setTimeout('ChangeTitle()', 1500);
        }
        ChangeTitle()

        <title>Minuevotitulodeprueba</title>






        share|improve this answer












        share|improve this answer



        share|improve this answer










        answered Nov 12 at 14:46









        epascarello

        151k13131179




        151k13131179























            0














            You set a new interval each time you call the function, but the iteration calls the function on an interval not a timeout. Therefore you can avoid this problem by declaring the iteration outside of the function call.






            var i=1;
            var LegitTitle = document.title;
            function ChangeTitle(){

            document.title = LegitTitle.substring(0,i);

            if(i>LegitTitle.length) {
            i = 0;
            }
            console.log('i = ' + i);
            console.log('Title = ' + document.title);
            i++;
            }
            ChangeTitle();
            setInterval(ChangeTitle,1500);

            <title>Minuevotitulodeprueba</title>








            share|improve this answer























            • That worked for me, but not exactly as I wanted, it shows the full title at the beginning. Just modify the position of the "i" and it seems to be displayed correctly, thank you very much experts!
              – McGyver
              Nov 12 at 14:41












            • @McGyver please accept the best answer so people will see that your problem is solved.
              – Mark Baijens
              Nov 12 at 15:03










            • You can do a normal function call on window.onload to change the title immediately.
              – Mark Baijens
              Nov 12 at 15:07
















            0














            You set a new interval each time you call the function, but the iteration calls the function on an interval not a timeout. Therefore you can avoid this problem by declaring the iteration outside of the function call.






            var i=1;
            var LegitTitle = document.title;
            function ChangeTitle(){

            document.title = LegitTitle.substring(0,i);

            if(i>LegitTitle.length) {
            i = 0;
            }
            console.log('i = ' + i);
            console.log('Title = ' + document.title);
            i++;
            }
            ChangeTitle();
            setInterval(ChangeTitle,1500);

            <title>Minuevotitulodeprueba</title>








            share|improve this answer























            • That worked for me, but not exactly as I wanted, it shows the full title at the beginning. Just modify the position of the "i" and it seems to be displayed correctly, thank you very much experts!
              – McGyver
              Nov 12 at 14:41












            • @McGyver please accept the best answer so people will see that your problem is solved.
              – Mark Baijens
              Nov 12 at 15:03










            • You can do a normal function call on window.onload to change the title immediately.
              – Mark Baijens
              Nov 12 at 15:07














            0












            0








            0






            You set a new interval each time you call the function, but the iteration calls the function on an interval not a timeout. Therefore you can avoid this problem by declaring the iteration outside of the function call.






            var i=1;
            var LegitTitle = document.title;
            function ChangeTitle(){

            document.title = LegitTitle.substring(0,i);

            if(i>LegitTitle.length) {
            i = 0;
            }
            console.log('i = ' + i);
            console.log('Title = ' + document.title);
            i++;
            }
            ChangeTitle();
            setInterval(ChangeTitle,1500);

            <title>Minuevotitulodeprueba</title>








            share|improve this answer














            You set a new interval each time you call the function, but the iteration calls the function on an interval not a timeout. Therefore you can avoid this problem by declaring the iteration outside of the function call.






            var i=1;
            var LegitTitle = document.title;
            function ChangeTitle(){

            document.title = LegitTitle.substring(0,i);

            if(i>LegitTitle.length) {
            i = 0;
            }
            console.log('i = ' + i);
            console.log('Title = ' + document.title);
            i++;
            }
            ChangeTitle();
            setInterval(ChangeTitle,1500);

            <title>Minuevotitulodeprueba</title>








            var i=1;
            var LegitTitle = document.title;
            function ChangeTitle(){

            document.title = LegitTitle.substring(0,i);

            if(i>LegitTitle.length) {
            i = 0;
            }
            console.log('i = ' + i);
            console.log('Title = ' + document.title);
            i++;
            }
            ChangeTitle();
            setInterval(ChangeTitle,1500);

            <title>Minuevotitulodeprueba</title>





            var i=1;
            var LegitTitle = document.title;
            function ChangeTitle(){

            document.title = LegitTitle.substring(0,i);

            if(i>LegitTitle.length) {
            i = 0;
            }
            console.log('i = ' + i);
            console.log('Title = ' + document.title);
            i++;
            }
            ChangeTitle();
            setInterval(ChangeTitle,1500);

            <title>Minuevotitulodeprueba</title>






            share|improve this answer














            share|improve this answer



            share|improve this answer








            edited Nov 12 at 15:05

























            answered Nov 12 at 14:29









            Mark Baijens

            6,637103252




            6,637103252












            • That worked for me, but not exactly as I wanted, it shows the full title at the beginning. Just modify the position of the "i" and it seems to be displayed correctly, thank you very much experts!
              – McGyver
              Nov 12 at 14:41












            • @McGyver please accept the best answer so people will see that your problem is solved.
              – Mark Baijens
              Nov 12 at 15:03










            • You can do a normal function call on window.onload to change the title immediately.
              – Mark Baijens
              Nov 12 at 15:07


















            • That worked for me, but not exactly as I wanted, it shows the full title at the beginning. Just modify the position of the "i" and it seems to be displayed correctly, thank you very much experts!
              – McGyver
              Nov 12 at 14:41












            • @McGyver please accept the best answer so people will see that your problem is solved.
              – Mark Baijens
              Nov 12 at 15:03










            • You can do a normal function call on window.onload to change the title immediately.
              – Mark Baijens
              Nov 12 at 15:07
















            That worked for me, but not exactly as I wanted, it shows the full title at the beginning. Just modify the position of the "i" and it seems to be displayed correctly, thank you very much experts!
            – McGyver
            Nov 12 at 14:41






            That worked for me, but not exactly as I wanted, it shows the full title at the beginning. Just modify the position of the "i" and it seems to be displayed correctly, thank you very much experts!
            – McGyver
            Nov 12 at 14:41














            @McGyver please accept the best answer so people will see that your problem is solved.
            – Mark Baijens
            Nov 12 at 15:03




            @McGyver please accept the best answer so people will see that your problem is solved.
            – Mark Baijens
            Nov 12 at 15:03












            You can do a normal function call on window.onload to change the title immediately.
            – Mark Baijens
            Nov 12 at 15:07




            You can do a normal function call on window.onload to change the title immediately.
            – Mark Baijens
            Nov 12 at 15:07


















            draft saved

            draft discarded




















































            Thanks for contributing an answer to Stack Overflow!


            • Please be sure to answer the question. Provide details and share your research!

            But avoid



            • Asking for help, clarification, or responding to other answers.

            • Making statements based on opinion; back them up with references or personal experience.


            To learn more, see our tips on writing great answers.





            Some of your past answers have not been well-received, and you're in danger of being blocked from answering.


            Please pay close attention to the following guidance:


            • Please be sure to answer the question. Provide details and share your research!

            But avoid



            • Asking for help, clarification, or responding to other answers.

            • Making statements based on opinion; back them up with references or personal experience.


            To learn more, see our tips on writing great answers.




            draft saved


            draft discarded














            StackExchange.ready(
            function () {
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53264157%2fbecause-my-dynamic-title-is-not-displayed-correctly%23new-answer', 'question_page');
            }
            );

            Post as a guest















            Required, but never shown





















































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown

































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown







            Popular posts from this blog

            Bressuire

            Vorschmack

            Quarantine