在iframe中加载不起作用 [英] Loading in iframe not working

查看:170
本文介绍了在iframe中加载不起作用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,

i在我的应用程序中使用iframe时,只要点击查看按钮iframe就应该加载动态创建的htm文件,但点击它时不会加载更新的htm文件而是加载旧文件仅在第二次点击时才正确加载。如果我通过保持断点检查其工作正常。如何解决这个问题?在此先感谢

解决方案

在加载所有HTML元素之前,您似乎试图触发click事件。如果您熟悉JQuery,请尝试这个



 


window )。load( function (){


#Your_view_button_id)。点击( function (){
// 点击查看按钮后要采取的行动......
});
});


hi all,
i have used iframe in my application whenever view button is clicked iframe should be loaded with dynamically created htm file but while clicking it is not loading with updated htm file instead loading the old file only and in second click only its getting loaded correctly. and if i check by keeping break point its working fine. How to solve to this prob? thanks in advance

解决方案

It seems you are trying to fire click event prior to loading of all HTML elements.If you are familiar with JQuery try this


(window).load(function(){


("#Your_view_button_id").click(function(){ //Action to be taken after view button is clicked... }); });


这篇关于在iframe中加载不起作用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆