2016-10-19 11:02:42 +02:00
|
|
|
<!DOCTYPE html>
|
|
|
|
<html>
|
|
|
|
<head>
|
|
|
|
<meta charset="utf-8">
|
|
|
|
<meta name="viewport" content="width=device-width">
|
|
|
|
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
2016-11-01 18:12:40 +01:00
|
|
|
<link rel="icon" href="/parity-logo-black-no-text.png" type="image/png">
|
2016-10-19 11:02:42 +02:00
|
|
|
<title>dev::Web3</title>
|
2016-11-06 17:42:25 +01:00
|
|
|
<script src="/parity-utils/web3.js"></script>
|
|
|
|
<style>
|
|
|
|
.box {
|
|
|
|
font-size: 1.5em;
|
|
|
|
text-align: center;
|
|
|
|
border-radius: 0.5em;
|
|
|
|
background: #eee;
|
|
|
|
padding: 1em;
|
|
|
|
margin: 1em;
|
|
|
|
}
|
|
|
|
</style>
|
2016-10-19 11:02:42 +02:00
|
|
|
</head>
|
|
|
|
<body>
|
2016-11-06 17:42:25 +01:00
|
|
|
<div class="box">
|
|
|
|
best block #<span id="blockNumber">unknown</span>
|
|
|
|
</div>
|
|
|
|
<script>
|
|
|
|
window.setInterval(function () {
|
|
|
|
window.web3.eth.getBlockNumber(function (error, blockNumber) {
|
|
|
|
if (error) {
|
|
|
|
console.error('error', error);
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
document.getElementById('blockNumber').innerHTML = blockNumber;
|
|
|
|
});
|
|
|
|
}, 1000);
|
|
|
|
</script>
|
2016-10-19 11:02:42 +02:00
|
|
|
</body>
|
|
|
|
</html>
|