:hover を使用せず、すべての要素に「onmouseover と onmouseout」を追加しないことで、これを行う方法はありますか?スクリプトで効果的な方法のように、すべての入力要素に onmouseover と onmouseout を設定します。
注: JQuery を試す前に JavaScript を試してください。
<head>
<title>123</title>
<style>
.button {
color: red;
}
.button:hover {
color: blue;
}
</style>
</head>
<body>
<div>
<input class="button" type="button" value="1">
<input class="button" type="button" value="2">
<input class="button" type="button" value="3">
</div>
</body>