Spaces:
Runtime error
Runtime error
File size: 1,033 Bytes
8dcac78 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 |
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Stock Data Fetching</title>
<script>
function fetchData() {
fetch('/fetch-stock-data') // Route to fetch stock data
.then(response => response.json())
.then(data => {
// Process the fetched data (display or use as needed)
console.log(data);
});
}
function showProgress() {
document.getElementById('progress').style.display = 'block';
fetchData(); // Call the function to fetch data
}
</script>
<style>
#progress {
display: none;
text-align: center;
margin-top: 50px;
}
</style>
</head>
<body>
<h1>Stock Data Fetching</h1>
<button onclick="showProgress()">Fetch Stock Data</button>
<div id="progress">
<p>Fetching stock data...</p>
<progress value="0" max="100"></progress>
</div>
</body>
</html>
|