fix conflicts
This commit is contained in:
Executable
+20
@@ -0,0 +1,20 @@
|
||||
|
||||
<html>
|
||||
<body>
|
||||
<div id="divvy" style="width: 100px; height: 100px; background-color: pink;">
|
||||
<script>
|
||||
window.onload = function donenow() {
|
||||
console.log("hi");
|
||||
document.getElementById("divvy").addEventListener("mousedown", function() { changeColor(this, "green"); });
|
||||
document.getElementById("divvy").addEventListener("mouseup", function() { changeColor(this, "yellow"); });
|
||||
document.getElementById("divvy").addEventListener("dblclick", function() { changeColor(this, "black"); });
|
||||
document.getElementById("divvy").addEventListener("mouseout", function() { changeColor(this, "blue"); });
|
||||
}
|
||||
console.log("hi2");
|
||||
|
||||
function changeColor(el, color) {
|
||||
el.style.backgroundColor = color;
|
||||
}
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
Reference in New Issue
Block a user