当前位置: 技术问答>java相关
stack overflow at:line 0 怎么回事呀?没有遇到过........
来源: 互联网 发布时间:2015-04-01
本文导语: 在浏览器中预览 为什么只要一有window.open就出现stack overflow at:line 0 | open() is a method of window object, if you define a function with the same name "open", it will replace the original method. So when you c...
在浏览器中预览
为什么只要一有window.open就出现stack overflow at:line 0
|
open() is a method of window object, if you define a function with the same name "open", it will replace the original method.
So when you call window.open() inside open(), it will call your function again and will lead to an infinite loop and result in stack overflow.
rename your function to something else, like openWin
So when you call window.open() inside open(), it will call your function again and will lead to an infinite loop and result in stack overflow.
rename your function to something else, like openWin
|
换一个函数名,应该没问题