代码之家  ›  专栏  ›  技术社区  ›  Maurice Le Olavarriet

Js-窗口。open不存在

  •  0
  • Maurice Le Olavarriet  · 技术社区  · 7 年前

    打开新窗口 在我的 我明白了 错误

    类型错误:窗口。打开不是一个函数

    然后我打电话:

    控制台日志(窗口)

    这是控制台的图像。 http://i.imgur.com/4k4HrSs.png

    $scope.ocPDF = function(){
      if($scope.oc.id){
        var width = window.innerWidth - 30;
        var url = 'whatever/' + $scope.oc.id;
        window.open(url, "name","menubar=1,resizable=1,width="+width+",height=500,top=80").focus();
      }
    }
    

    重置js 这很奇怪,因为在 其他领域有效 而不是浏览器。

    1 回复  |  直到 7 年前
        1
  •  0
  •   tiagodws    7 年前

    检查是否 window.open 或者只是 open