`

showModalDialog缓存

 
阅读更多
JS使用showModalDialog展示窗口时,会出现页面缓存,无法刷新的现象。
解决的关键是模式窗口请求的URL参数是否变化。以下JS解决此问题
function openModalDialog(src, width, height, showScroll){
var timestamp = Date.parse(new Date());
	var times = timestamp;
	
	if(src.indexOf("?") > 0){
		src=src+"&myTimes="+times;
	} else {
		src=src+"?myTimes="+times;
	}

	return window.showModalDialog(src,"","location:No;status:No;help:No;dialogWidth:"+width+";dialogHeight:"+height+";scroll:"+showScroll+";");   
}


分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics