请老师检查下代码
来源:5-2 编程练习
慕仙0287733
2020-06-13 20:30:30
<!DOCTYPE html>
<html lang="en">
<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>
//此处写代码
$('div').mousemove(function (a) {
$(this).text('pageX:' + a.pageX + ', pageY:' + a.pageY);
});
$('div').mouseout(function (a) {
$(this).text('');
})
</script>
</body>
</html>
请老师检查下代码
1回答
同学你好,代码实现效果很棒。继续加油,祝学习愉快!
相似问题