javascript 调用 window.open 时 Firefox 中的问题

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/5820180/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-10-25 18:28:43  来源:igfitidea点击:

Problem in firefox when calling window.open

javascriptoracle-xeoracle-apex

提问by macwadu

When i'm calling this code in the link of a chart in apex

当我在 apex 中的图表链接中调用此代码时

javascript:window.open('http://google.pt','mywindow','width=400,height=200', 'bReplace=true');

javascript:window.open('http://google.pt','mywindow','width=400,height=200', 'bReplace=true');

it opens a new window with google page but puts the chart page with a blank page with [object Window]wrote on it

它打开一个带有谷歌页面的新窗口,但将图表页面放在一个空白页面上,上面[object Window]写着

How can i maintain the chart page?

如何维护图表页面?

回答by SLaks

You need to force the expresion to not return a value:

您需要强制表达式不返回值:

javascript:void(window.open(...))