<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Title</title>
<style>
body {
font-family: "Microsoft YaHei", serif;
}
body, dl, dd, p, h1, h2, h3, h4, h5, h6 {
margin: 0;
}
ol, ul, li {
margin: 0;
padding: 0;
list-style: none;
}
img {
border: none
}
</style>
</head>
<body>
<div id="wrap">
<p class="qwe">001</p>
<p class="qwe">002</p>
<p class="qwe">003</p>
<p class="qwe">004</p>
<p class="qwe">005</p>
</div>
<script>
let qwe = document.getElementsByClassName("qwe");
[...qwe].forEach(ele=>{
ele.onclick = ()=>{
console.log(ele.innerHTML);
}
})
</script>
</body>
</html>
Python3Turtle