How does inline Javascript (in HTML) work?

前端 未结 6 727
醉酒成梦
醉酒成梦 2020-11-28 19:21

I know this is bad practice. Don\'t write code like this if at all possible.

Of course, we\'ll always find ourselves in situations where a clever snippet of inline

6条回答
  •  伪装坚强ぢ
    2020-11-28 19:50

    It looks suspicious because there is no apparent function that is being returned from!

    It is an anonymous function that has been attached to the click event of the object.

    why are you doing this, Steve?

    Why on earth are you doi.....Ah nevermind, as you've mentioned, it really is widely adopted bad practice :)

提交回复
热议问题