Created
November 10, 2017 12:48
-
-
Save dobrienSTJ/9d76e6c4ba9b850ffe9eab00fb868dc3 to your computer and use it in GitHub Desktop.
JS
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<html> | |
<body> | |
<span id="div1" style="color:black;" onmouseover="stext()" onmouseout="htext()">TEXT1</span><p /> | |
<hr color="black" /> | |
<span id="div2" style="color:red;" onmouseover="htext()" onmouseout="stext()">Text2</span> | |
function stext() { | |
var x = document.getElementById("div1"); | |
var y = document.getElementById("div2"); | |
x.style.color = 'red'; | |
y.style.color = 'black'; | |
} | |
function htext() { | |
var x = document.getElementById("div1"); | |
var y = document.getElementById("div2"); | |
x.style.color = 'black'; | |
y.style.color = 'red'; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment