Home >Web Front-end >JS Tutorial >Introduction to how to deal with multiple calls and infinite loop bugs in window.onresize under IE_javascript skills
window.onresize has a bug in IE browser where it is executed multiple times or even loops endlessly, causing the browser to freeze
Solution:
PS: navigator.userAgent.split(";")[1].toLowerCase().indexOf("msie")>-1 This problem of judging IE will appear in the chrome browser" toLowerCase()" method undefined error.
So the correction is navigator.userAgent.toLowerCase().indexOf("msie")>-1