【发布时间】:2020-03-16 16:25:40
【问题描述】:
这是我添加指向函数的点击事件的html代码,该函数会提醒一些消息。
<div class="horizontal-align" *ngFor="let taxId of selectedTaxIds">
<button class="btn btn-rounded" disabled *ngIf="taxId.Tin !== 'All'">
<span >Taxi ID: </span>
<span class="text-semibold pl-4"> {{ taxId.Tin }} </span>
<div class="close-btn" (click)="newfun()" >
<mat-icon class="icon-display" svgIcon="close"></mat-icon>
</div>
</button>
</div>
newfun(){
alert('some message')
}
这适用于 chrome,但不适用于 IE。我尝试向标签声明 id 并使用运行正常的 document.getElementById 方法选择 id。即使在检查代码时,我也可以在 IE 开发人员工具事件选项卡中看到单击事件。 请帮我解决这个问题
【问题讨论】:
标签: javascript html angular internet-explorer onclick