【发布时间】:2021-09-01 06:20:31
【问题描述】:
当我关闭模态视频时,它会继续播放。下面是我正在使用的脚本 vch。任何帮助..谢谢你
// 获取模态 var modal = document.getElementById("myModal");
// Get the button that opens the modal
var btn = document.getElementById("myBtn");
// Get the <span> element that closes the modal
var span = document.getElementsByClassName("close")[0];
// When the user clicks the button, open the modal
btn.onclick = function() {
modal.style.display = "block";
}
// When the user clicks on <span> (x), close the modal
span.onclick = function() {
modal.style.display = "none";
}
【问题讨论】:
标签: video modal-dialog autoplay