📅  最后修改于: 2022-03-11 15:02:06.580000             🧑  作者: Mango
// e = Mouse click event.
let rect = e.target.getBoundingClientRect();
let x = e.clientX - rect.left; //x position within the element.
let y = e.clientY - rect.top; //y position within the element.