JavaScript code debugging

< 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

Mar.01,2021

red in quotation marks
'red'


correct answers are all above. It is recommended that
`a:hover {

be used for a tag.
color:red;

} `
in addition, you can set the style for a tag, but the order should be in accordance with the normal state of
1 link: connection

2 after the visited: connection has been accessed

3 when the hover: mouse is over the connection

4 when the active: connection is pressed


for this kind of mouse with a transformation style, it is better to use the css:hover selector a:hover {
color:red;}

Menu