1脚本说明:
2把如下代码加入<body>区域中
3<script Language="javascript">
4function a(x,y,color)
5{document.write("<img border='0' style='position: absolute; left: "+(x+300)+"; top: "+(y+200)+";background-color: "+color+"' src='px.gif' width=1 height=1>")}
6</script>
7<script>
8
9for(t=1;t<=360;t++){
10lo=200 * Math.sin(2 * (Math.PI / 180) * t);
11x = lo * Math.cos((Math.PI / 180) * t);
12y = lo * Math.sin((Math.PI / 180) * t);
13a(x,y,"#000000");
14lo=200 * Math.cos(2 * (Math.PI / 180) * t);
15x = lo * Math.cos((Math.PI / 180) * t);
16y = lo * Math.sin((Math.PI / 180) * t);
17a(x,y,"#ff0000");
18}
19</script>
20
2把如下代码加入<body>区域中
3<script Language="javascript">
4function a(x,y,color)
5{document.write("<img border='0' style='position: absolute; left: "+(x+300)+"; top: "+(y+200)+";background-color: "+color+"' src='px.gif' width=1 height=1>")}
6</script>
7<script>
8
9for(t=1;t<=360;t++){
10lo=200 * Math.sin(2 * (Math.PI / 180) * t);
11x = lo * Math.cos((Math.PI / 180) * t);
12y = lo * Math.sin((Math.PI / 180) * t);
13a(x,y,"#000000");
14lo=200 * Math.cos(2 * (Math.PI / 180) * t);
15x = lo * Math.cos((Math.PI / 180) * t);
16y = lo * Math.sin((Math.PI / 180) * t);
17a(x,y,"#ff0000");
18}
19</script>
20
思考:
可以用来生成验证码