iframe的src指向的内容不刷新的解决办法之一

问题:url对应的页面有变化了,可是url一直不变,也就是iframe的src的值一直没变.所以不刷新内容;

解决办法:

<iframe  NAME="content_frame" id="video" width=100% style="min-height:900px"  marginwidth=0 marginheight=0  ></iframe>

JS:

<script type="text/javascript">
$(function(){
	$("#video").attr("src","../im/login.html"+"?time="+new Date().getTime());
});
 </script>

猜你喜欢

转载自blog.csdn.net/lwang_IT/article/details/81868873
今日推荐