Conditions d’achèvement
4.13: Correction
<!DOCTYPE html>
<html lang="fr">
<head>
<meta charset="utf-8"/>
<title>Pos click</title>
<script src="https://code.jquery.com/jquery-3.6.0.min.js"></script>
</head>
<body>
<p>
La souris se trouve à la position
x=<span id="affiche-x">?</span>,
y=<span id="affiche-y">?</span>
</p>
<script>
$(document).on('mousemove',fonction_a_appeler);
function fonction_a_appeler(event)
{
console.log('coucou',event.pageX,event.pageY);
$('#affiche-x').text(event.pageX);
$('#affiche-y').text(event.pageY);
}
</script>
</body>
</html>