“JS Reload” Code-Antworten

Fenster aktualisieren js

window.location.reload();
Worried Wolf

Aktualisieren Seite js

//with no cache
document.location.reload(true);
//else
document.location.reload();

/**
 * Si le paramètre est nul, recharge la page, sinon recharge la page avec le paramètre.
 * If the parameter is null, reload the page, else, reload the page with the parameter
 * @param [param=null] - Le paramètre que vous souhaitez ajouter à l'URL.
 */
function reloadPage(param = null){

    if ( param != null ){
        window.location.href = window.location.href.replace( /[\?#].*|$/, `${param}` );
    }

    else
    { 
        if ( window.location.href.split('?').length > 1 ){
            window.location.href = window.location.href.split('?')[0];
        }

        else 
            window.location.reload();
    }

    //param == null ? window.location.reload(): window.location.href = window.location.href.replace( /[\?#].*|$/, `${param}` );
}
Joyous Jaguar

Seite JavaScript aktualisieren

location.reload();
// OR
window.location.reload();
Anxious Alligator

So laden Sie das Fenster in JavaScript neu

location.reload():
Distinct Donkey

Aktualisieren Seite js

window.location.reload(true);
Enthusiastic Elephant

JS Reload

<input type="button" value="Reload Page" onClick="document.location.reload(true)">

<p>Clicking the above button will refresh the page/frame.</p>
<img src="/pix/samples/4s.jpg" alt="Sample image">
Gleaming Gaur

Ähnliche Antworten wie “JS Reload”

Fragen ähnlich wie “JS Reload”

Weitere verwandte Antworten zu “JS Reload” auf JavaScript