i have one paragraph and one button inside a div tag. I want to use onlick="" method on div tag but not on the button which is inside that div tag. How can I do this.
<div class="alert alert-secondary alert-dismissible fade show" role="alert" data-bs-toggle="collapse" data-bs-target="#collapseExample{{data.id}}" aria-expanded="false" aria-controls="collapseExample">
<p>
<strong>{{ data.name }} / {{ data.messager_profile }}</strong> <span>{{ data.message_headline }}</span>
<br>
<span style="float: left;">8 days ago</span>
</p>
<button type="button" class="btn-close" data-bs-dismiss="alert" aria-label="Close"></button>
<br>
<div class="collapse" id="collapseExample{{data.id}}">
<div class="card card-body">
<strong>Detailed Message:-</strong> <span>{{ data.message }}</span>
</div>
</div>
</div>