parent
06c440591e
commit
d1d3bb829f
@ -0,0 +1,34 @@
|
|||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang="en">
|
||||||
|
<head>
|
||||||
|
<meta charset="UTF-8">
|
||||||
|
<meta http-equiv="refresh" content="5">
|
||||||
|
<title>Server</title>
|
||||||
|
<script src="https://code.jquery.com/jquery-3.6.4.min.js"></script>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<div id="testContent">
|
||||||
|
</div>
|
||||||
|
<script>
|
||||||
|
// Fonction pour charger dynamiquement le contenu de test.php
|
||||||
|
function loadTestContent() {
|
||||||
|
$.ajax({
|
||||||
|
url: 'test.php', // Chemin vers test.php
|
||||||
|
type: 'GET',
|
||||||
|
success: function(response) {
|
||||||
|
$('#testContent').html(response); // Mettre à jour le contenu
|
||||||
|
},
|
||||||
|
error: function() {
|
||||||
|
console.error('Erreur lors du chargement de test.php');
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
// Appeler la fonction pour charger le contenu au chargement initial
|
||||||
|
loadTestContent();
|
||||||
|
|
||||||
|
// Actualiser la page toutes les 5 secondes
|
||||||
|
setInterval(loadTestContent, 5000);
|
||||||
|
</script>
|
||||||
|
</body>
|
||||||
|
</html>
|
Loading…
Reference in new issue