本文介绍了window.open()在chrome中打开一个空白屏幕的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我在Firefox中检查了这个相同的代码,它完美地工作。事实上,这在几个星期前在Chrome中有效,但现在我只是空白屏幕。
代码如下:
该按钮点击时触发该功能。
函数保存(){
var saveURL = canvas.toDataURL();
window.open(saveURL,_blank,location = 0,menubar = 0);
}
解决方案
var win = window.open();
win.document.write(< img src ='+ canvas.toDataURL()+'/>);
I checked this same code in Firefox and it works perfectly. In fact, this worked in Chrome a few weeks back, but now I'm just getting a blank screen.
The code is below:
The function triggers on button click.
function saving() {
var saveURL = canvas.toDataURL();
window.open(saveURL, "_blank", "location=0, menubar=0");
}
解决方案
var win=window.open();
win.document.write("<img src='"+canvas.toDataURL()+"'/>");
这篇关于window.open()在chrome中打开一个空白屏幕的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!