开发者

jquery title selector error in ie

开发者 https://www.devze.com 2023-04-09 20:42 出处:网络
why is it giving error in ie, when i try to change the title. $(\'title\').text(开发者_如何学运维\'new title\');

why is it giving error in ie, when i try to change the title.

$('title').text(开发者_如何学运维'new title');
or
$('title').html('new title');

works fine in other browsers.

btw i just want to mention, when i try to get the value of title using following code, it works fine.

alert($('title'));

anyone has any idea on why its doing this? its soo annoying to fix bugs for ie.


You should set the document.title property to an ordinary string.

0

精彩评论

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