资料
表格
制度
合同
管理
职场
经营
创业
范文
总结
计划
作文
文章
美文
词句
教程
模板
图片
字体
图标
办公
人事
财务
生产
管理资源吧首页
>>>
教程
>>>
编程
>>>
JavaScript教程
>>>
float ad浮动广告代码
<html> <head> <meta http-equiv="Content-Type" content="text/html; charset=gb2312"> <meta name="GENERATOR" content="Microsoft FrontPage 4.0"> <meta name="ProgId" content="FrontPage.Editor.Document"> <title>New Page 1</title> <img src="/_New/_cj/myeditor/sysimage/space.gif" class="ewebeditor__script" _ewebeditor_fake_tag="script" _ewebeditor_fake_value="%3Cscript%20language%3D%22javascript%22%3E%20%0D%0A%20%20%20var%20isRight%3Dtrue%3B%20%0D%0A%20%20%20var%20isDown%3Dtrue%3B%20%0D%0A%20%20%20function%20init()%20%0D%0A%20%20%20%7B%20%0D%0A%20%20%20%20%20%20float()%3B%20%0D%0A%20%20%20%7D%20%0D%0A%20%20%20%20%0D%0A%20%20%20function%20float()%20%0D%0A%20%20%20%7B%20%0D%0A%20%20%20%20%20%20var%20top_u%3DparseInt(document.body.offsetHeight)-parseInt(%24(%22ad%22).style.height)%3B%3B%20%0D%0A%20%20%20%20%20%20var%20top_l%3D0%3B%20%0D%0A%20%20%20%20%20%20var%20left_u%3DparseInt(document.body.offsetWidth)-parseInt(%24(%22ad%22).style.width)%3B%20%0D%0A%20%20%20%20%20%20var%20left_l%3D0%3B%20%0D%0A%20%20%20%20%20%20var%20mx%3D%2BparseInt(Math.random()*10)%3B%20%0D%0A%20%20%20%20%20%20var%20my%3D%2BparseInt(Math.random()*10)%3B%20%0D%0A%20%20%20%20%20%20%20%0D%0A%20%20%20%20%20%20if(parseInt(%24(%22ad%22).style.left)%3CparseInt(document.body.scrollLeft))%20%0D%0A%20%20%20%20%20%20%7B%20%0D%0A%20%20%20%20%20%20%20%20%20isRight%3Dtrue%3B%20%0D%0A%20%20%20%20%20%20%7D%20%0D%0A%20%20%20%20%20%20else%20if(parseInt(%24(%22ad%22).style.left)%3EparseInt(document.body.scrollLeft)%2Bleft_u)%20%0D%0A%20%20%20%20%20%20%7B%20%0D%0A%20%20%20%20%20%20%20%20%20isRight%3Dfalse%3B%20%0D%0A%20%20%20%20%20%20%7D%20%0D%0A%20%20%20%20%20%20if(parseInt(%24(%22ad%22).style.top)%3C%3DparseInt(document.body.scrollTop))%20%0D%0A%20%20%20%20%20%20%7B%20%0D%0A%20%20%20%20%20%20%20%20%20isDown%3Dtrue%3B%20%0D%0A%20%20%20%20%20%20%7D%20%0D%0A%20%20%20%20%20%20else%20if(parseInt(%24(%22ad%22).style.top)%3EparseInt(document.body.scrollTop)%2Btop_u)%20%0D%0A%20%20%20%20%20%20%7B%20%0D%0A%20%20%20%20%20%20%20%20%20isDown%3Dfalse%3B%20%0D%0A%20%20%20%20%20%20%7D%20%0D%0A%20%20%20%20%20%20mx%3DisRight%3Fmx%3A0-mx%3B%20%0D%0A%20%20%20%20%20%20my%3DisDown%3Fmy%3A0-my%3B%20%0D%0A%20%20%20%20%20%20%24(%22ad%22).style.left%3DparseInt(%24(%22ad%22).style.left)%2Bmx%3B%20%0D%0A%20%20%20%20%20%20%24(%22ad%22).style.top%3DparseInt(%24(%22ad%22).style.top)%2Bmy%3B%20%0D%0A%20%20%20%20%20%20setTimeout(%22float()%22%2C50)%20%20%20%20%20%20%20%0D%0A%20%20%20%7D%20%0D%0A%20%20%20%20%0D%0A%20%20%20function%20%24(id)%20%0D%0A%20%20%20%7B%20%0D%0A%20%20%20%20%20%20return%20document.getElementById(id)%20%0D%0A%20%20%20%7D%20%0D%0A%20%20%20%20%0D%0A%20%20%20function%20ind(str%2Cs)%20%0D%0A%20%20%20%7B%20%0D%0A%20%20%20%20%20%20document.body.insertAdjacentHTML(%22BeforeEnd%22%2Cstr%2Bs)%3B%20%0D%0A%20%20%20%7D%20%0D%0A%3C%2Fscript%3E"> </head margin=0> <body onload=init()> <div id="ad" style="position:absolute;height:0px;width:0px; border:1px solid black; width:100px; height:70px; left:0px;top:0px; height:0px;"></div> </body> </html>
[Ctrl+A 全选 注:
如需引入外部Js需刷新才能执行
]
教程首页
更多教程