Uncaught TypeError: Cannot read property 'location' of undefined

Uncaught TypeError: Cannot read property 'location' of undefined

您没有将 url 传递给函数 openNewWindow

函数中的 if(url) returns false,所以它永远不会 returns 任何东西。

这就是 popup 成为 undefined

的原因