SpeedTest Checker Tool
Internet SpeedTest Checker
Click Start to Test
body {
background: linear-gradient(to right, #74ebd5, #acb6e5);
font-family: 'Arial', sans-serif;
}
.card {
background: white;
border-radius: 15px;
box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}
#start-btn {
width: 50%;
font-weight: bold;
}
h1, h3 {
text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
}
document.getElementById('start-btn').addEventListener('click', function () {
const status = document.getElementById('status');
const downloadSpeedElem = document.getElementById('download-speed');
const uploadSpeedElem = document.getElementById('upload-speed');
const pingElem = document.getElementById('ping');
status.innerText = 'Testing... Please wait.';
status.classList.remove('text-info');
status.classList.add('text-warning');
// Simulate Speed Testing with Random Data
setTimeout(() => {
const downloadSpeed = (Math.random() * 100 + 50).toFixed(2);
const uploadSpeed = (Math.random() * 50 + 20).toFixed(2);
const ping = (Math.random() * 50 + 10).toFixed(0);
downloadSpeedElem.innerText = `${downloadSpeed} Mbps`;
uploadSpeedElem.innerText = `${uploadSpeed} Mbps`;
pingElem.innerText = `${ping} ms`;
status.innerText = 'Speed Test Completed!';
status.classList.remove('text-warning');
status.classList.add('text-success');
}, 3000); // Simulated delay for testing
});