最近做项目,要求刷新验证码的功能。验证码是在一个iframe中的,要求“换一个验证码”的功能。


开始使用:document.frames['vCodeIFrame'].location.reload();但是在firefox下面不work


后来查了资料更新如下:


document.getElementById('vCodeIFrame').contentWindow.location.reload();


这样在IE 和Firefox下都可以刷新Iframe页面都可以work了!!!

posted on 2010-07-29 11:27  阳光Mike  阅读(2439)  评论(0)    收藏  举报