浮动广告代码

来源:百度知道 编辑:UC知道 时间:2024/09/22 19:32:07
怎么能让广告无规则的浮动在网页上

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>无标题文档</title>
</head>

<body>
<div style="background-color:#abcdef; width:100px; height:100px; position: absolute; left: 0; top: 0;" id="moveablediv"></div>
<script language="javascript">
var num=new Date().getTime();//取一个时间的值作为随机数
var mx=num%15;
var my=num%20;
var ch=document.documentElement.clientHeight;
var cw=document.documentElement.clientWidth;
setInterval("move('moveablediv')",100);
function move(d)
{
var mdiv=document.getElementById(d);
while((mx=