Javascript 如何在启动响应表中按加号图标时调用脚本

Javascript 如何在启动响应表中按加号图标时调用脚本,javascript,jquery,bootstrap-4,Javascript,Jquery,Bootstrap 4,我在JSF primefaces中使用bootstrap 4。在我的页面中,我使用bootstrap responsive table。在移动视图中,第一列显示一个加号图标。现在需要在按下加号图标的同时调用脚本 <table id="table" style="width: 100%;" class="table table-striped table-bordered responsive"> <tr><

我在JSF primefaces中使用bootstrap 4。在我的页面中,我使用bootstrap responsive table。在移动视图中,第一列显示一个加号图标。现在需要在按下加号图标的同时调用脚本

<table id="table" style="width: 100%;" class="table table-striped table-bordered responsive">
<tr><td>....</td>
</tr>
<tr><td>....</td>
</tr>
<tr><td>....</td>
</tr>
</table>
我需要内容+图标按下调用脚本


我认为你需要更好地描述你的问题。这很难理解。在试图理解之后,我的大脑受伤了question@ThanveerShah现在修改为给定的图像链接在按下图标时给出onclick事件很好,您仍然可以使用onclick事件,如果您可以在jsFiddle或codepen中发布整个代码,那就太好了
<tr class="odd" role="row">
<td style="width:35%" tabindex="0">
::before
</td>
</tr>
table.dataTable.dtr-inline.collapsed > tbody > tr[role="row"] > 
td:first-child::before, table.dataTable.dtr-inline.collapsed > tbody > tr[role="row"] > th:first-child::before {
    top: 9px;
    left: 4px;
    height: 14px;
    width: 14px;
    display: block;
    position: absolute;
    color: white;
    border: 2px solid white;
    border-radius: 14px;
    box-shadow: 0 0 3px #444;
    box-sizing: content-box;
    text-align: center;
    text-indent: 0 !important;
    font-family: 'Courier New', Courier, monospace;
    line-height: 14px;
    content: '+';
    background-color: #31b131;
}