ボタンをクリックした後、クラスが「1」の要素にカーソルを合わせると、カーソルが手になります。これが私のコードです
<!DOCTYPE html>
<html>
<head>
<script type="text/javascript" language="JavaScript">
function cursor()
{
document.getElementByClass("one").style.cursor="pointer";
}
</script>
<h1 class="one">Mouse over this text!</h1>
</head>
<body>
<p class="fff">not me!</p>
<button type="button" onclick="cursor()">Change cursor</button>
</body>
</html>
getElementById("one") に変更し、要素の1つを「1」クラスから「1」IDに変更した場合にのみ機能しました。これがクラスでも機能しないのはなぜですか?