代码:
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<!DOCTYPE html>
<html>
<head>
<title>First DApp Demo</title>
<link rel="stylesheet" type="text/css" href="main.css">
<script src="https://cdn.jsdelivr.net/npm/web3@latest/dist/web3.min.js"></script> <!-- 引入web3 -->
</head>
<body>
<div class="container">
<h1>First DApp Demo</h1>
<h2 id="info"> </h2>
<label>姓名:</label>
<input id="name" type="text" name="">
<label>年龄:</label>
<input id="age" type="text" name="">
<button id="button">更新内容</button>
</div>
<script>
console.log("web3:" + web3);
</script>
</body>
</html>
报错: Uncaught ReferenceError: web3 is not defined at index.html:23