Get the title of a requested page using jQuery AJAX

后端 未结 1 1461
春和景丽
春和景丽 2020-12-10 04:21

I have written the following to do AJAX requests in my app:

$(document).ready(function () {

    $(\'ul#ui-ajax-tabs li:first\').addClass(\'selected\');

            


        
相关标签:
1条回答
  • 2020-12-10 04:38

    I am new to jQuery, but I will give it a try anyways:

    var newTitle = $(responseHtml).filter('title').text();
    

    And if one of the above works, the current title could be changed by

    document.title = newTitle;
    

    Again I am a jQuery and Javascript beginner and just wanted to give it a try :) So excuse me if its stupid and wont work :)

    0 讨论(0)
提交回复
热议问题