开发者

jquery refresh the iframe but it is not permanent

$('#id开发者_开发技巧OfMyButton').click(function() { 
$('#idOfMyIframe').attr('src', 'the new url'); }); 

this code works and it load new url but again it refresh and back to initial status which I set in design mode it happens in a second.


Is that because you are missing return false;. To be honest your question isn't very clear.

$('#idOfMyButton').click(function() { 
  $('#idOfMyIframe').attr('src', 'the new url'); 
  return false;
});

This will prevent the button from carrying on and refresh the page

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜