“Halaman Refresh PHP” Kode Jawaban

PHP Refresh

//refreshes your current page
header("Refresh:0");

//refreshes your current page after 5 seconds
header("Refresh:5");

//If you need to redirect it to another page
header("Refresh:0; url=page2.php");
Gifted Grouse

Refresh header php

//Refreshes your current page
header("Refresh:0");
header("Refresh:2"); // Refreshes after 2 seconds

//If you need to redirect it to another page
header("Refresh:0; url=page2.php");
MeVyom

Halaman Refresh PHP

header("Refresh:0");
A-Décamètre

header refresh page php

header("Refresh:0");


header("Refresh:0; url=page2.php");
Enchanting Eel

halaman penyegaran php tanpa memuat ulang

window.addEventListener('load', function()
{
    var xhr = null;

    getXmlHttpRequestObject = function()
    {
        if(!xhr)
        {               
            // Create a new XMLHttpRequest object 
            xhr = new XMLHttpRequest();
        }
        return xhr;
    };

    updateLiveData = function()
    {
        var now = new Date();
        // Date string is appended as a query with live data 
        // for not to use the cached version 
        var url = 'livefeed.txt?' + now.getTime();
        xhr = getXmlHttpRequestObject();
        xhr.onreadystatechange = evenHandler;
        // asynchronous requests
        xhr.open("GET", url, true);
        // Send the request over the network
        xhr.send(null);
    };

    updateLiveData();

    function evenHandler()
    {
        // Check response is ready or not
        if(xhr.readyState == 4 && xhr.status == 200)
        {
            dataDiv = document.getElementById('liveData');
            // Set current data text
            dataDiv.innerHTML = xhr.responseText;
            // Update the live data every 1 sec
            setTimeout(updateLiveData(), 1000);
        }
    }
});
Enrybi

Jawaban yang mirip dengan “Halaman Refresh PHP”

Pertanyaan yang mirip dengan “Halaman Refresh PHP”

Lebih banyak jawaban terkait untuk “Halaman Refresh PHP” di PHP

Jelajahi jawaban kode populer menurut bahasa

Jelajahi bahasa kode lainnya