gpt4 book ai didi

html - “如何在 上添加”mouseover 和 mouseout?

转载 作者:太空宇宙 更新时间:2023-11-04 05:48:01 25 4
gpt4 key购买 nike

我有一个表格,我需要三个不同的链接才能显示在鼠标悬停的特定行上。这些链接是“查看”、“编辑”和“立即触发”。我需要这个事件只发生在 session 表上。这是我当前的 HTML:

<div>
<h1>Manage Workflows</h1>
</div>
<div class="tablez">
<table class="table table-hover" id = "groups">
<thead>
<tr>
<th scope="col">Groups</th>
</tr>
</thead>
<tbody>
<tr *ngFor = "let row of rows" (click) = "onRowClick(row.id)">
<td class="data">{{row.group}}</td>
</tr>

</tbody>
</table>
<table class="table" id = "sessions">
<thead>
<tr>
<th scope="col">Sessions</th>
<th scope="col" id = "trigger">Next Trigger</th>
</tr>
</thead>
<tbody>
<tr *ngFor = "let row of tableTwo">
<td scope="row">{{row.session}}</td>
<td scope="row" id = "trigger" >{{row.nextTrigger}}</td>
</tr>

</tbody>
</table>
</div>

最佳答案

你可以使用 Angular 鼠标悬停事件

 <tr *ngFor = "let row of tableTwo" (mouseover)="showLinks=true" (mouseout)="showLinks=false" >
<td scope="row">{{row.session}}</td>
<td scope="row" id = "trigger" >{{row.nextTrigger}} </td>
<td *ngIf="!showLinks" scope="row"> View Edit Trigger Now links </td>
</tr>

关于html - “如何在 <tr> 上添加”mouseover 和 mouseout?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/58528576/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com