jQuery事件5-2练习
来源:5-2 编程练习
深海皮皮虾
2019-06-09 16:22:12
<!DOCTYPE html> <html> <head> <meta charset="UTF-8"> <title>习题</title> <style> div { width: 300px; height: 300px; border: 1px solid red; text-align: center; line-height: 300px; } </style> </head> <body> <div></div> <script src="https://cdn.bootcss.com/jquery/3.3.1/jquery.js"></script> <script> $(document).ready(function() { $("div").mousemove(function(event) { $(this).text("pageX:"+event.pageX+",pageY:"+event.pageY); }) }) </script> </body> </html>
请老师检查
1回答
好帮手慕言
2019-06-09
同学你好,效果实现的很棒!继续加油~祝学习愉快
相似问题