我试图检查用户单击按钮后是否加载了iframe.
我有
$('#MainPopupIframe').load(function(){
console.log('load the iframe')
//the console won't show anything even if the iframe is loaded.
})
Run Code Online (Sandbox Code Playgroud)
HTML
<button id='click'>click me</button>
//the iframe is created after the user clicks the button.
<iframe id='MainPopupIframe' src='http://...' />...</iframe>
Run Code Online (Sandbox Code Playgroud)
有什么建议?
顺便说一句,我的iframe是动态创建的.它不会加载初始页面加载.
我正在为一个非常大的网站做一些测试,创建了许多不同的开发人员.有没有办法判断该网站是否使用Flash和/或已加载Flash 插件?如果页面使用flash,有没有办法告诉页面/代码的哪一部分触发Flash插件加载到浏览器/页面?
更新: 我会更清楚一点.当我使用chrome for mac进入我的网页的登录页面时,我打开Chrome任务管理器,我没有看到任何插件列为正在运行.当我登录并登陆主页时,我现在看到Chrome已加载"Plug-in:Shockwave Flash"进程.查看开发人员工具中的"网络"选项卡,我看不到正在下载的任何Flash(swf)文件.如果我长时间停留在页面上Chrome将删除"Plug-in:Shockwave Flash"进程.为什么Chrome在页面未使用时加载此插件?