javascript - 获取窗口参考并检测组件角度中的窗口关闭 2+
问题描述
<form *ngIf="data.yesAsLink" id="myForm" ngNoForm [action]=action method="post"
target="pay" onsubmit="window.open('about:blank','pay','width=1050,height=860');"
style="display: inline; margin-left: 20px;">
<input type="hidden" name="ClientId" value="ExelaRON" />
<input type="hidden" name="Param" [value]=input />
<button type="submit" (click)="onYesClick(this)"
mat-button class="btn primary-btn" value="Submit"
style="font-size: 14px;">Pay now</button>
</form>
此代码位于组件 html 文件中,并通过提交表单打开子窗口。如何跟踪关闭窗口事件?
解决方案
推荐阅读
- r - 如何根据r中的值表创建真值表
- c++ - 数组错误(不允许不完整的类型)
- r - 使用 purrr 和 dplyr 按组跨 tibble 列表的每个元素的平均值
- arrays - 查找最接近目标的 x 个数组元素
- python - 了解 Python-ldap 中的命名冲突
- python - Pycharm 调试器无法启动:以退出代码 -1073741819 (0xC0000005) 结束
- python - 在使用 pylint docparams 时减少 Python 文档字符串中的冗余
- python - 理解 Keras 中的正则化
- java - (多张图片)动画Java
- php - 在 CURL 请求后在 HTML 源中搜索“cdn”字符串