http://blog.csdn.net/jslang/article/details/37991517
解决方案 »
- 为什么我用getElementById得到的对象属性为空呢?
- yui 雅虎的js插件里面 resize 的使用
- (在线等)错误手机号动态检测为什么第一个总是提示为错误?
- 关于setNamedItem(name)
- ThickBox在弹出窗口提交时碰到一个问题
- 使用regsvr32.exe aaa.dll 没有找到dllregisterserver输入点,无法注册这个文件 是什么原因,急在线等
- IE活动内容的问题
- 遇到一个弹出菜单弹出方向的问题
- 我以前找到一个和资源管理器一摸一样的树形目录的javascript代码,但是...
- 在javascript中如何往<div>中写入html语言?
- 求教怎么在网页中加入背景音乐,让iphone的safari支持?
- 新手求解 Crypt()
<!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>
<title> new document </title>
<style type="text/css">
#aa {
position:absolute;
left:0px;
top:0px;
width:30px;
height:30px;
z-index:99;
background-color: #ad7ee7;
}
</style>
</head><body>
<div id="aa"></div>
<script type="text/javascript">
var x=300, y=0, r=300, t=0;
function run()
{
var tr = t*Math.PI/180;
var tx = x-Math.cos(tr)*r;
var ty = y+Math.sin(tr)*r;
var aa = document.getElementById("aa");
aa.style.left=tx+"px";
aa.style.top=ty+"px";
t+=1;
if(t<=180)
setTimeout(run,20);
else
aa.style.display="none";
}
run();
</script>
</body>
</html>