canvas as the background, how to click div without passing the event to canvas
The structure is as follows. Canvas writes a background, but there is a click monitor, changing the background with each click. There is also a click-to-refresh function in the p tag of div.
when you click canvas, the click event of p will not be triggered, but clicking p will trigger the event of canvas. How to prevent this kind of sibling event from bubbling?
<div>
<p id="fnl" title="" onclick="getFnl()">
</div>
<canvas></canvas>