编辑下面的代码:【加编码】
<html> <body> <div onmousedown="mDown(this)" onmouseup="mUp(this)" style="background-color:#D94A38;width:90px;height:20px;padding:40px;">Click Me</div> <script> function mDown(obj) { obj.style.backgroundColor="#1ec5e5"; obj.innerHTML="Release Me" } function mUp(obj) { obj.style.backgroundColor="#D94A38"; obj.innerHTML="Thank You" } </script> </body></html>
结果: 【此窗口】 帮助?
Try it Yourself - © 自强学堂