How to stop event propagation with inline onclick attribute?

前端 未结 13 2356
情书的邮戳
情书的邮戳 2020-11-21 23:46

Consider the following:

13条回答
  •  谎友^
    谎友^ (楼主)
    2020-11-22 00:28

    The best solution would be handle with the event through a javascript function, but in order to use a simple and quick solution using the html element directly, and once that the "event" and "window.event" are deprecated and not universally supported (https://developer.mozilla.org/en-US/docs/Web/API/Window/event), I suggest the following "hard code":

    ...

提交回复
热议问题