Created
October 20, 2018 11:55
-
-
Save Curtisho/b9636b9f05ffdd0385045e1266695a28 to your computer and use it in GitHub Desktop.
// source https://jsbin.com/diqepah
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
<!DOCTYPE html> | |
<html> | |
<body> | |
<div onmousedown="mDown(this)" onmouseup="mUp(this)" | |
style="background-color:#32CD32;width:90px;height:20px;padding:40px;"> | |
點選我~~~</div> | |
<script> | |
function mDown(obj) { | |
obj.style.backgroundColor = "#00008B"; | |
obj.innerHTML = "做得很好"; | |
} | |
function mUp(obj) { | |
obj.style.backgroundColor="#FFD700"; | |
obj.innerHTML="非常感謝"; | |
} | |
</script> | |
<script id="jsbin-source-html" type="text/html"><!DOCTYPE html> | |
<html> | |
<body> | |
<div onmousedown="mDown(this)" onmouseup="mUp(this)" | |
style="background-color:#32CD32;width:90px;height:20px;padding:40px;"> | |
點選我~~~</div> | |
<script> | |
function mDown(obj) { | |
obj.style.backgroundColor = "#00008B"; | |
obj.innerHTML = "做得很好"; | |
} | |
function mUp(obj) { | |
obj.style.backgroundColor="#FFD700"; | |
obj.innerHTML="非常感謝"; | |
} | |
<\/script> | |
</body> | |
</html> | |
</script> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment