最新下载
热门教程
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
ios设备中angularjs无法改变页面title的解决方法
时间:2022-06-25 15:39:25 编辑:袖梨 来源:一聚教程网
如下所示:
$rootScope.$watch('title',function(title){
var body = document.getElementsByTagName('body')[0];
document.title = title;
var iframe = document.createElement("iframe");
iframe.title = '';
iframe.;
iframe.;
iframe.setAttribute("src", "/empty.png");
iframe.addEventListener('load', function() {
setTimeout(function() {
iframe.removeEventListener('load');
document.body.removeChild(iframe);
}, 0);
});
document.body.appendChild(iframe);
});
// 代码放在app.js中,代码备份下,预防下次遇到同样的问题。
相关文章
- 洛克王国世界克洛修斯的试炼攻略-克洛修斯的试炼如何通关 05-31
- 秒哒3.0让8岁小学生想法秒变手机APP,AI应用门槛归零 05-31
- 燕云十六声费云怎么结交 费云对话攻略 05-31
- Ardent 推出秒级 Postgres 沙箱,零迁移供 AI 编码 agent 测试 05-31
- 小米手机怎么收到地震预警 05-31
- 战争雷霆最新兑换码 战争雷霆兑换码长期有效汇总2026 05-31