複数のフレームに約 300 個のリンクがあるページがあります。すべてのリンクには、少なくとも 1 つの他のフレームの ID に対応する ID があります。マウスオーバーで両方のリンクを強調表示するスクリプトを書いています。現在、両方のリンクのテキストの色を変更できます (以下を参照)。個々の単語の背景色を黄色に変更して、テキストが強調表示されているように見せたいです。
<html><head><title>Test</title>
<script>
function hey(id)
{document.getElementById(id).style.color = "red";
window.parent.frames["frame2"].document.getElementById(id).style.color = "red";}
function bye(id)
{document.getElementById(id).style.color = "black";
window.parent.frames["frame2"].document.getElementById(id).style.color = "black";}
</script>
</head>
<body>
<a id="1" class="word" onmouseover="hey(this.id)" onmouseout="bye(this.id)">hello</a>
<a id="2" class="word" onmouseover="hey(this.id)" onmouseout="bye(this.id)">world</a>....
</body></html>
ウィンドウの残りの背景を変更せずに、リンクの背景色を変更するにはどうすればよいですか?