动态创建iframe标签页并监控其加载成功(onload)的事件
2023-09-14 09:03:08 时间
<html>
<body onload = test()>
</body>
<script>
function test() {
var iframe = document.createElement('iframe');
iframe.id = 'testframe';
iframe.name = 'testframe';
iframe.src = 'http://www.baidu.com/';
var fn = function() { alert('iframe loaded ok'); };
if (iframe.attachEvent) {
iframe.attachEvent('onload', fn);
} else {
iframe.onload = fn;
}
document.body.insertBefore(iframe, document.body.firstChild);
}
</script>
</html>
相关文章
- 视频监控平台EasyGBS设备播放断流现象的排查分析及解决
- 前端监控实战之 Sentry
- 教你如何监控Oracle Dataguard 日志传输状态监控问题
- Linux流量监控:轻松掌控网络流量(linux流量监控命令)
- MySQL 性能监控指标分析(mysql监控指标)
- n实现linux系统下HTTP服务器的监控(linuxhttp监控)
- 探索Linux下多种监控软件选择(linux监控软件有哪些)
- Linux下快速安装OV7725监控系统(linux ov7725)
- SQL Server性能监控:实现高效运行(sqlserver监控项)
- SQL Server 事件监控:分析及预防(sqlserver 事件)
- MSSQL资源的实时监控和分析(mssql的资源查看)
- 监测Redis更新状态及早发现风险(监控redis是否更新)
- Redis集群监控精准视角详解(redis 集群怎么监控)
- oracle监控某表变动触发器例子(监控增,删,改)