JavaScript -- 广告随鼠标移动, 点击一次后关闭
2024-10-20 15:59:10
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>无标题文档</title> <style type="text/css">
#bodyId{
border:#0000FF solid 1px;
width:500px;
height:800px;
} </style> <script type="text/javascript">
window.onload = function()
{
document.body.onmouseover = function()
{
var adId = document.getElementById("adId");
adId.style.left = event.x - 10;
adId.style.top = event.y - 10; }
} function closed()
{
var adId = document.getElementById("adId");
adId.style.display = "none";
} </script> </head> <body> <div id="adId" style="position:absolute; left:0; top:0;" onclick="closed()">
<a href="http://www.baidu.com" target="_blank" ><img src="1.jpg" width="80px" height="100px" /> </a>
</div> <div id="bodyId" >
body 区域
</div> </body>
</html>
最新文章
- 使用LogMaster4Net实现应用程序日志的集中管理
- java疑问-继承问题
- 最全的iOS面试题及答案-转载
- 【final】站立会议---11.27
- 贪心+构造( Codeforces Round #344 (Div. 2))
- js中的with语句
- wordpress编辑主题时报错Warning: scandir() has been disabled for security reasons in
- 【C#学习笔记】图片像素操作
- Drainage Ditches(Dinic最大流)
- 转:11个实用但你可能不知道的Python程序库
- HDU 1520 树形DP入门
- Java框架spring 学习笔记(十六):c3p0连接池的配置以及dao使用jdbcTemplate
- linux安装php-redis扩展
- 39. 在linux下装好Tomcat要给 tomcat/bin/下面所有.sh的文件执行权限
- ZeptoLab Code Rush 2015 B. Om Nom and Dark Park DFS
- K&;R《C语言》书中的一个Bug
- android 各种颜色值 colors.xml
- Python爬虫教程-33-scrapy shell 的使用
- centos下 KeyboardInterrupt 退不出来的结局方法
- 37-生成 JWT Token