Barra de Progresso
About this app
Uma barra de progresso que vai de 1 até um milhão
Barra de Progresso Barra de Progresso de 1 até Um milhão 0 / 1000000 Iniciar Resetar
Related apps
Put this on your site
Source
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width,initial-scale=1">
<title>Barra de Progresso</title>
<meta name="description" content="Uma barra de progresso que vai de 1 até um milhão">
<meta name="keywords" content="barra de progresso, progresso, um milhão">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.6.0/jquery.min.js"></script>
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.0.2/dist/css/bootstrap.min.css" rel="stylesheet"
integrity="sha384-EVSTQN3/azprG1Anm3QDgpJLIm9Nao0Yz1ztcQTwFspd3yD65VohhpuuCOmLASjC" crossorigin="anonymous">
<link href="https://stackpath.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css" rel="stylesheet">
<link href="https://fonts.googleapis.com/css?family=Roboto" rel="stylesheet">
<script type="text/javascript">
try {
// App Javascript Goes Here. Place your entire script content inside the try block for error handling.
document.addEventListener("DOMContentLoaded", function() {
const progressBar = document.getElementById('progress-bar');
const progressText = document.getElementById('progress-text');
const startButton = document.getElementById('start-button');
const resetButton = document.getElementById('reset-button');
let count = 1;
let intervalId;
function startProgress() {
intervalId = setInterval(() => {
progressBar.value = count;
progressText.innerText = `${count} / 1000000`;
count++;
if (count > 1000000) {
clearInterval(intervalId);
}
}, 1);
}
function resetProgress() {
clearInterval(intervalId);
count = 1;
progressBar.value = 0;
progressText.innerText = '0 / 1000000';
}
startButton.addEventListener('click', startProgress);
resetButton.addEventListener('click', resetProgress);
});
} catch (error) {
// This will throw the error to the parent window.
throw error;
}
</script>
<style>
body {
background-color: #f5f5f5;
font-family: 'Roboto', sans-serif;
}
.container {
max-width: 600px;
margin: 0 auto;
padding: 20px;
text-align: center;
}
h1 {
font-size: 24px;
margin-bottom: 20px;
}
progress {
width: 100%;
height: 30px;
border: none;
border-radius: 5px;
margin-bottom: 20px;
}
#progress-text {
font-size: 18px;
margin-bottom: 20px;
}
button {
padding: 10px 20px;
font-size: 16px;
background-color: #007bff;
color: #fff;
border: none;
border-radius: 5px;
cursor: pointer;
transition: background-color 0.3s ease;
}
button:hover {
background-color: #0056b3;
}
</style>
</head>
<body>
<div id="main-container" class="container">
<h1>Barra de Progresso de 1 até Um milhão</h1>
<progress id="progress-bar" max="1000000" value="0"></progress>
<p id="progress-text">0 / 1000000</p>
<button id="start-button">Iniciar</button>
<button id="reset-button">Resetar</button>
</div>
</body>
</html>
NEW APPS
These are apps made by the community!