Self invoking functions javascript

后端 未结 6 1495
长发绾君心
长发绾君心 2021-01-19 14:07

I wrote a self invoking function in both firefox and chrome it it wouldn\'t invoke.

I wrote something to the effect of

(function () { alert(\"THE\")         


        
6条回答
  •  清酒与你
    2021-01-19 14:23

    That function works. Javascript supports functional programming, so for a browser not to run that code, even for a very old browser that would be absurd. Are you sure that statement is being reached? Try debugging javascript that occurs before that statement.

提交回复
热议问题