What happens to code after a javascript redirect (setting [removed].href)?

后端 未结 2 1834
慢半拍i
慢半拍i 2020-11-29 09:25

I have the following javascript redirect code followed by some more code.

window.location.href = \'/someurl\';
alert(\'hello\');
alert(\'hello again\');
         


        
2条回答
  •  感动是毒
    2020-11-29 09:53

    The Javascript session will struggle to continue it's mission in the face of impending doom. Coding in this manner is considered unpredictable. ...and cruel.

提交回复
热议问题