I am writing a webpage that will have 200+ links per page. Each link has a unique id that matches an id in another frame. I want to run a onmouseover function that will change the text color of both links across frames. Here’s what I’ve got so far.
<html><head><title>Test</title>
<script>
function hey()
{var id=//HELP PLEASE; document.getElementById(id).style.color = "red";}
function bye()
{var id=//HELP PLEASE; document.getElementById(id).style.color = "black";}
</script>
</head>
<body>
<a id="1" class="word" onmouseover="hey()" onmouseout="bye()">hello</a>
<a id="2" class="word" onmouseover="hey()" onmouseout="bye()">world</a>....
</body></html>
Any thoughts?
Pass the id into the function: