开发者

How can remove Page Title set while loading Page via Ajax?

开发者 https://www.devze.com 2023-02-16 10:34 出处:网络
I am using Codeigniter 2 with modular extensions. I load all my pages via Ajax Jquery. I load page like follow:

I am using Codeigniter 2 with modular extensions. I load all my pages via Ajax Jquery.

I load page like follow:

<a href="#Add Products" onclick="addProduct()> Ad开发者_如何学Cd Product</a>

In IE, the title page is set as My Admin Title#Add Products.

How can I remove that post fix in IE title?

I want that My Page Title remains also same, just "My Admin Title".


You may want to try different ways to set title with JQuery:

$(document).attr('title','Whatever');  

OR

$(document)[0].title = 'Whatever';  

OR

$(document).get(0).title = 'Whatever';  


You can access the title element by doing:

document.getElementsByTagName('title')[0].innerHTML = "My Admin Title";


You can put something like

document.title = "Hello World!";

to change the title of the HTML Page, but I am not sure how it work with your extensions.

0

精彩评论

暂无评论...
验证码 换一张
取 消