$('.modal').on('shown.bs.modal',function(){ //correct here use 'shown.bs.modal' event which comes in bootstrap3
$(this).find('iframe').attr('src','http://www.google.com')
})
As shown above use 'shown.bs.modal'
event which comes in bootstrap 3.
EDIT :-
and just try to open some other url from iframe other than google.com ,it will not allow you to open google.com due to some security threats.
The reason for this is, that Google is sending an "X-Frame-Options: SAMEORIGIN" response header. This option prevents the browser from displaying iFrames that are not hosted on the same domain as the parent page.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…