INVESTINGV2 / index.html
Martyt's picture
Create index.html
8dcac78
<!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>