I want to print the number of clicks for the console, but this should be for all empty areas. Is it possible?
I tried with the button, but could not do what I want.
HTML:
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<script src="myScript3.js"></script>
</head>
<body>
<button onclick="tiklama()">Tıkla!</button>
</body>
</html>
JS:
var x = 0;
function tiklama() {
console.log(++x);
}
source
share