我希望散列和btc都显示为1,但btc显示为NaN 并且哈希值显示为[object HTMLSpanElement]
<html>
<head>
<link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.0.13/css/all.css" integrity="sha384-DNOHZ68U8hZfKXOrtjWvjxusGo9WQnrNx2sqG0tfsghAvtVlRW3tvkXWZh58N9jp" crossorigin="anonymous">
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.1.0/css/bootstrap.min.css">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.14.0/umd/popper.min.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/4.1.0/js/bootstrap.min.js"></script>
<style>
</style>
</head>
<body>
<pre> </pre>
<div class="container">
<div class="card-deck">
<div class="card bg-primary">
<div class="card-body text-center">
<i class="fab fa-btc" height="32" width ="32"></i>
<p class="card-text">Satoshis: <span id="btc"></span></p>
</div>
</div>
<div class="card bg-warning">
<div class="card-body text-center">
<p class="card-text">Hashs: <span id="hashs"></span></p>
</div>
</div>
<div class="card bg-success">
<div class="card-body text-center">
<p class="card-text">a</p>
</div>
</div>
<div class="card bg-danger">
<div class="card-body text-center">
<p class="card-text">a</p>
</div>
</div>
</div>
</div>
<pre> </pre>
<center>make me a css button to start mining </center>
</body>
<script>
var btc = Number(localStorage.getItem("btc") || "1");
var btc = Number(localStorage.getItem("hashs") || "1");
function update() {
document.getElementById('btc').innerHTML = btc;
document.getElementById('hashs').innerHTML = hashs;
localStorage.setItem("btc", btc);
localStorage.setItem("hashs", hashs);
}
update();
document.getElementById('ao').onclick = function () {
btc++;
update();
}
document.getElementById('hash').onclick = function () {
hashs++;
update();
}
// <button id="ao">Add One</button>
</script>
</html>