gpt4 book ai didi

jquery - ie中的iframe问题

转载 作者:行者123 更新时间:2023-12-01 06:09:33 25 4
gpt4 key购买 nike

每当用户在输入验证码文本时出错时,我都会使用 iframe 刷新验证码。

这个 iframe 位于一个看起来像这样的表单内......

<iframe id="cvbnm" frameborder="0" width="176" height="75" marginheight="0" marginwidth="0">     </iframe>   

每当用户输入错误的验证码时,我都会使用

 $("#cvbnm").attr("src", "captcha.php");  

其中 captcha.php 是包含验证码文件的不同页面。

这在 Firefox 中工作正常......但在 ie 中不刷新......请帮助我....

最佳答案

您可能想为此问题添加 jQuery 标签。

可能发生的情况是,由于 src 保持不变,IE 不会为该页面生成新的请求。

尝试

$('#cvbnm').removeAttr('src').attr('src', 'captcha.php');

或者

$('#cvbnm').attr('src', '').attr('src', 'captcha.php');

更新:

好的,添加一下如何

parent.frames[FrameID].window.location.reload();

或者

document.getElementById(FrameID).contentDocument.location.reload(true);

我必须承认我是从 here 得到这个的

关于jquery - ie中的iframe问题,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/692454/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com