Javascript 未捕获类型错误:无法读取属性';焦点';铬上未定义的颜色
我想打印我的网页,然后它在Mozilla中正常工作,但在google chrome中不正常。您正在检查Javascript 未捕获类型错误:无法读取属性';焦点';铬上未定义的颜色,javascript,jquery,angularjs,google-chrome,Javascript,Jquery,Angularjs,Google Chrome,我想打印我的网页,然后它在Mozilla中正常工作,但在google chrome中不正常。您正在检查窗口。focus,但随后尝试使用新窗口。focus。检查和使用的内容要一致。var newWindow=window.open(“”,'export');if(newWindow.focus){newWindow.focus();}如果(newWindow.focus)在这一行中给出相同的错误{ var newWindow=window.open('','export');
窗口。focus
,但随后尝试使用新窗口。focus
。检查和使用的内容要一致。var newWindow=window.open(“”,'export');if(newWindow.focus){newWindow.focus();}如果(newWindow.focus)在这一行中给出相同的错误{
var newWindow=window.open('','export');
// Puts focus on the newWindow
if (window.focus) {
newWindow.focus();
}