27 lines
609 B
HTML
Executable file
27 lines
609 B
HTML
Executable file
<!DOCTYPE html>
|
|
<html>
|
|
<title>Exercici 04</title>
|
|
<meta name="viewport" content="width=device-width, initial-scale=1">
|
|
<link rel="stylesheet" href="https://www.w3schools.com/w3css/4/w3.css">
|
|
<head>
|
|
<script>
|
|
window.addEventListener("load", main);
|
|
function main() {
|
|
document.addEventListener("click", function(e){
|
|
document.getElementById("test").innerHTML+="<p>Coordenades: " + e.clientX + " / " + e.clientY + "</p>"
|
|
})
|
|
}
|
|
|
|
</script>
|
|
</head>
|
|
<body>
|
|
|
|
<div class="w3-container">
|
|
<h1>Exercici 04</h1>
|
|
</div>
|
|
|
|
<div id="test" class="w3-container">
|
|
</div>
|
|
|
|
</body>
|
|
</html> |