鼠标背景

来源:互联网 发布:excle取数据前几位 编辑:程序博客网 时间:2024/05/24 15:40
 <script language="Javascript">
<!--
function backcolor(form){
    temp = ""
    for (var i = 0; i < 16; i++) {
        temp = form.color[i].value
        if (form.color[i].checked){
document.bgColor = temp }
        }
    }
function randombackground(){
    document.bgColor = getColor()
    }
function getColor(){
    currentdate = new Date()
    backgroundcolor =
currentdate.getSeconds()
    if (backgroundcolor > 44)
        backgroundcolor =
backgroundcolor - 45
    else if (backgroundcolor > 29)
        backgroundcolor =
backgroundcolor - 30
    else if (backgroundcolor > 15)
        backgroundcolor =
backgroundcolor - 16
    if (backgroundcolor == 0 )
        return "olive";
    else if (backgroundcolor == 1 )
        return "teal";
    else if (backgroundcolor == 2 )
        return "red";
    else if (backgroundcolor == 3 )
        return "blue";
    else if (backgroundcolor == 4 )
        return "maroon";
    else if (backgroundcolor == 5 )
        return "navy";
    else if (backgroundcolor == 6 )
        return "lime";
    else if (backgroundcolor == 7 )
        return "fuschia";
    else if (backgroundcolor == 8 )
        return "green";
    else if (backgroundcolor == 9 )
        return "purple";
    else if (backgroundcolor == 10 )
        return "gray";
    else if (backgroundcolor == 11 )
        return "yellow";
    else if (backgroundcolor == 12 )
        return "aqua";
    else if (backgroundcolor == 13 )
        return "black";
    else if (backgroundcolor == 14 )
        return "white";
    else if (backgroundcolor == 15 )
        return "silver";
    }
// -->
</script>
<a HREF="你的地址"
onMouseOver="randombackground()">
<p>连接的名称 </a></p>
  制作动画
<script language="JavaScript">
// make the array of images
bendyList = new Array('动画图片0.gif',
'动画图片1.gif', '动画图片2.gif', '动画图片3.gif',
'动画图片4.gif', '动画图片5.gif', '动画图片6.gif', );
// daPosition will point to successive images in
the bendyList array
daPosition = 0;
function imageFlip() {
// increment the pointer
if(daPosition == bendyList.length-1) {
daPosition = 0;
} else {
daPosition++;
}
// change the image
document.images['daImg'].src =
bendyList[daPosition];
// do it again
setTimeout('imageFlip()', 200);
}
</script>

原创粉丝点击