Kenapa dulu?

PHPz
Lepaskan: 2024-08-26 21:43:32
asal
1130 orang telah melayarinya

Why do used to?

<script type='text/javascript'>
//<![CDATA[
var uri = window.location.toString();
if (uri.indexOf("/" + new Date().getFullYear() + "/", "/")) {
    var clean_uri = uri.replace("/" + new Date().getFullYear() + "/", "/");
    window.history.replaceState({}, document.title, clean_uri);
}
if (uri.indexOf("/" + new Date().getFullYear() + "/1/", "/")) {
    var clean_uri = uri.replace("/" + new Date().getFullYear() + "/1/", "/");
    window.history.replaceState({}, document.title, clean_uri);
}
if (uri.indexOf("/" + new Date().getFullYear() + "/12/", "/")) {
    var clean_uri = uri.replace("/" + new Date().getFullYear() + "/12/", "/");
    window.history.replaceState({}, document.title, clean_uri);
}
if (uri.indexOf("/" + new Date().getFullYear() + "/11/", "/")) {
    var clean_uri = uri.replace("/" + new Date().getFullYear() + "/11/", "/");
    window.history.replaceState({}, document.title, clean_uri);
}
if (uri.indexOf("/" + new Date().getFullYear() + "/10/", "/")) {
    var clean_uri = uri.replace("/" + new Date().getFullYear() + "/10/", "/");
    window.history.replaceState({}, document.title, clean_uri);
}
if (uri.indexOf("/" + new Date().getFullYear() + "/9/", "/")) {
    var clean_uri = uri.replace("/" + new Date().getFullYear() + "/9/", "/");
    window.history.replaceState({}, document.title, clean_uri);
}
if (uri.indexOf("/" + new Date().getFullYear() + "/8/", "/")) {
    var clean_uri = uri.replace("/" + new Date().getFullYear() + "/8/", "/");
    window.history.replaceState({}, document.title, clean_uri);
}
if (uri.indexOf("/" + new Date().getFullYear() + "/7/", "/")) {
    var clean_uri = uri.replace("/" + new Date().getFullYear() + "/7/", "/");
    window.history.replaceState({}, document.title, clean_uri);
}
if (uri.indexOf("/" + new Date().getFullYear() + "/6/", "/")) {
    var clean_uri = uri.replace("/" + new Date().getFullYear() + "/6/", "/");
    window.history.replaceState({}, document.title, clean_uri);
}
if (uri.indexOf("/" + new Date().getFullYear() + "/5/", "/")) {
    var clean_uri = uri.replace("/" + new Date().getFullYear() + "/5/", "/");
    window.history.replaceState({}, document.title, clean_uri);
}
if (uri.indexOf("/" + new Date().getFullYear() + "/4/", "/")) {
    var clean_uri = uri.replace("/" + new Date().getFullYear() + "/4/", "/");
    window.history.replaceState({}, document.title, clean_uri);
}
if (uri.indexOf("/" + new Date().getFullYear() + "/3/", "/")) {
    var clean_uri = uri.replace("/" + new Date().getFullYear() + "/3/", "/");
    window.history.replaceState({}, document.title, clean_uri);
}
if (uri.indexOf("/" + new Date().getFullYear() + "/2/", "/")) {
    var clean_uri = uri.replace("/" + new Date().getFullYear() + "/2/", "/");
    window.history.replaceState({}, document.title, clean_uri);
}

//]]>
</script>
Salin selepas log masuk

Atas ialah kandungan terperinci Kenapa dulu?. Untuk maklumat lanjut, sila ikut artikel berkaitan lain di laman web China PHP!

sumber:dev.to
Kenyataan Laman Web ini
Kandungan artikel ini disumbangkan secara sukarela oleh netizen, dan hak cipta adalah milik pengarang asal. Laman web ini tidak memikul tanggungjawab undang-undang yang sepadan. Jika anda menemui sebarang kandungan yang disyaki plagiarisme atau pelanggaran, sila hubungi admin@php.cn
Tutorial Popular
Lagi>
Muat turun terkini
Lagi>
kesan web
Kod sumber laman web
Bahan laman web
Templat hujung hadapan