我在我的网站上有3个不同的谷歌地图,一个用于在桌面,平板电脑和手机上观看时,当我调整我的浏览器时,人们可能会做新的地图指针,现在已调整大小不在右侧的地方,直到我刷新页面,我只想重新加载iframe中,即时通讯非常新的JavaScript和试过,但其贫富工作重新加载谷歌地图
<script type="text/javascript">
if($(window).width() == 985){
document.getElementById('map-desk').contentWindow.location.reload(true);
}
if($(window).width() == 975){
document.getElementById('map-tab').contentWindow.location.reload(true);
}
if($(window).width() == 765){
document.getElementById('map-mob').contentWindow.location.reload(true);
}
</script>
当屏幕等于一定宽度的iframe与ID重载左右喜欢刷新