“HTML OnClick Stop Propagation” Respostas de código

OnClick StopPropagation

<span onclick="event.stopPropagation(); alert('you clicked inside the header');">something inside the header</span>
Average Anaconda

HTML OnClick Stop Propagation

// "event" is not universally supported, so instead grab the first
// argument passed through the onclick handler and call
// "stopPropagation()" on it
<div onclick="(arguments[0] ? arguments[0].stopPropagation() : false);">...</div>
P. Tune

Respostas semelhantes a “HTML OnClick Stop Propagation”

Perguntas semelhantes a “HTML OnClick Stop Propagation”

Mais respostas relacionadas para “HTML OnClick Stop Propagation” em HTML

Procure respostas de código populares por idioma

Procurar outros idiomas de código