<script type="text/javascript"> xhr.open("GET","fichier.php"); xhr.onreadystatechange = function() { if (xhr.readyState==4) { var texteMessage = xhr.responseText; var liMessage = document.getElementById("message"); alert("Abracadabra"); liMessage.style.display = "list-item"; liMessage.innerHTML = texteMessage; } } xhr.send(); </script>