新的一天
This commit is contained in:
@@ -1,10 +1,12 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>JS-DOM</title>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
|
||||
<h1 id="title1">11111</h1>
|
||||
@@ -12,7 +14,11 @@
|
||||
<h1>33333</h1>
|
||||
|
||||
<script>
|
||||
|
||||
// let h1 = document.querySelector('#title1');
|
||||
// let h1 = document.querySelector('h1');
|
||||
let h1 = document.querySelectorAll('h1');
|
||||
h1[1].innerHTML = '44444';
|
||||
</script>
|
||||
</body>
|
||||
|
||||
</html>
|
||||
Reference in New Issue
Block a user