W3School TIY Editor
W3School 在线教程
改变方向
暗黑模式
运行代码
<!DOCTYPE html> <html> <body> <div onmouseover="mOver(this)" onmouseout="mOut(this)" style="background-color:#D94A38;width:120px;height:20px;padding:40px;"> 请把鼠标移上来</div> <script> function mOver(obj) { obj.innerHTML = "谢谢您" } function mOut(obj) { obj.innerHTML = "请把鼠标移上来" } </script> </body> </html>