开发者

Problem in IE 8

Hi Calling my image code refresh using following code

Here "captchaController.do" is the springController.

  <img name="captchaImage" id="captchaImage" src="captchaController.do" width="150px" height="30px">&nbsp;<A href="#" class="standardLink" name="refreshImage" id="refreshImage" onClick="javascript:refreshImageCode();">Refresh</A&开发者_JAVA百科gt;

/* This is used to refresh the image code*/
function refreshImageCode(){
 $("#captchaImage").attr("src", "captchaController.do");
}

its working fine IE6 but problem in IE 8. Nothing is going happen. Image is not displayed

Please help


IE8 is probably caching your image (or not trying to reload since the name is the same). Try this:

function refreshImageCode(){
    $("#captchaImage").attr("src", "captchaController.do?" + (Math.random() * 1000));
}
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜