<!DOCTYPE html>
<head>
<meta charset="UTF-8">
<title>Document</title>
<style type="text/css">
</style>
</head>
<body>
<div id="one" class="two">dsfsd </div>
<script type="text/javascript">
setTimeout(function() {
alert(document.getElementById("one").style);
alert(document.getElementsByClassName("two").style);
}, 20);
</script>
</body>document.getElementById("one").style可以用, 而 alert(document.getElementsByClassName("two").style);用不了,怎么回事
添加回答
举报
0/150
提交
取消