Reputation: 11
I tried to use the event.clientX outside of window function. But it says xAxis is not defined. Can have an way to get it? My code below,
window.onclick = function(event) {
let xAxis = event.clientX;
}
alert(xAxis);
Upvotes: 1
Views: 75