我使用一个按钮来捕捉照片,它工作正常,但我访问另一个链接/路线后无法捕捉照片。这是我的代码示例:
document.getElementById("imageCapture").addEventListener("click", imageCapture);
function imageCapture() {
//code for camera take picture
}
是有任何页面:init或任何其他方法?
simple:只需在页面上调用eventListener函数:init