2
So I’m making a pc pliative with the electron
who uses html, js e css
but when I was trying to make a value in html change with my js it did nothing but when I put the script into html it worked, problem is that I needed to have a js file just to make these changes!.
My HTML
<!DOCTYPE html>
<html lang="en" dir="ltr">
<head>
<meta charset="utf-8">
<title>EComerce App Slime</title>
<link rel="stylesheet" href="css/index.css">
<script src="js/index.js"></script>
</head>
<body>
<div id="UpperBar">
<p class="MASlime">MASlime</p>
<p class="Home">HOME</p>
</div>
<div id="HomePage">
<div id="Totals">
<p class="TotalEarnings">Total Earnings</p>
<p class="TotalOrders">Total Orders</p>
<p id="Earnings">HIII</p>
</div>
<div id="NewOrder">
</div>
<div id="Recipe">
<div id="Small">
</div>
<div id="Medium">
</div>
<div id="Big">
</div>
</div>
</div>
</body>
</html>
MY JS
var element = document.getElementById("Earnings");
element.innerHTML = "100€";
Thanks, it worked great! After a lot of research the only thing that needed to come to stackoverflow!
– user132381