<script type="text/javascript">
window.onload = function () {
var oUl = document.getElementById('ul');
var aLi = document.getElementsByTagName('li');
aLi.onclick = function () {
alert(1)
}
}
</script>
</head>
<body>
<ul id="ul">
<li>1</li>
<li>2</li>
</ul>
</body>
</html>
_风景都不存在
幕布斯6393831