为什么在 ie 中出现错误,当我尝试更改标题时。
$('title').text('new title');
or
$('title').html('new title');
在其他浏览器中工作正常。
顺便说一下,当我尝试使用以下代码获取 title 的值时,它工作正常。
alert($('title'));
有人知道为什么要这样做吗?为 ie 修复错误太烦人了。
最佳答案
您应该将 document.title
属性设置为普通字符串。
关于javascript - ie中的jquery标题选择器错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/7630062/