简体   繁体   English

iFrame提交表单,事件监听器

[英]iFrame submit form, event listener

I have a form inside an IFrame, and when I'm submitting it some content displays in it. 我在IFrame中有一个表单,并且在提交表单时会在其中显示一些内容。 I need some event listener, which tells me that the iframe was submitted and the content loaded. 我需要一些事件侦听器,该事件侦听器告诉我iframe已提交并且内容已加载。

Is there any way to do this? 有什么办法吗?

You can use this event while submitting form 您可以在提交表单时使用此事件

$("iframe").load(function(){
    var response = this.document.getElementsByTagName("body").innerHTML;
    alert(response);
});

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM