< html >
<head>
<meta charset="utf-8">
<script>
function changeColor(aobj ,color){
aobj.style.color=color;
}
</script>
</head>
<body>
<a onmouseover="changeColor(this,red)">
</a>
</body>
</html>
Code as above