JavaScript event [removed] not triggered

后端 未结 8 1417
无人及你
无人及你 2021-02-01 01:15

I\'ve got the following code in a website:

 window.onload = resize;
 window.onresize = resize;

 function resize(){
  heightWithoutHeader = (window.innerHeight -         


        
8条回答
  •  忘掉有多难
    2021-02-01 01:38

    If it's really in that order, it's definitely not going to work. You can't assign a function to an event handler before the function itself is declared.

提交回复
热议问题