【www.gdgbn.com--word】





广告代码_http://www.111cn.net

<script type="text/网页特效">
function $(id) { return document.getelementbyid(id); }
function moveelement(elementid,final_x,final_y,interval) {
  if (!document.getelementbyid) return false;
  if (!document.getelementbyid(elementid)) return false;
  var elem = document.getelementbyid(elementid);
  if (elem.movement) {
    cleartimeout(elem.movement);
  }
  if (!elem.style.left) {
    elem.style.left = "0px";
  }
  if (!elem.style.top) {
    elem.style.top = "0px";
  }
  var xpos = parseint(elem.style.left);
  var ypos = parseint(elem.style.top);
  if (xpos == final_x  &&  ypos == final_y) {
  return true;
  }
  if (xpos < final_x) {
    var dist = math.ceil((final_x - xpos)/10);
    xpos = xpos + dist;
  }
  if (xpos > final_x) {
    var dist = math.ceil((xpos - final_x)/10);
    xpos = xpos - dist;
  }
  if (ypos < final_y) {
    var dist = math.ceil((final_y - ypos)/10);
    ypos = ypos + dist;
  }
  if (ypos > final_y) {
    var dist = math.ceil((ypos - final_y)/10);
    ypos = ypos - dist;
  }
  elem.style.left = xpos + "px";
  elem.style.top = ypos + "px";
  var repeat = "moveelement(""+elementid+"","+final_x+","+final_y+","+interval+")";
  elem.movement = settimeout(repeat,interval);
}
function classnormal(){
 var focusbtnlist = $("focus_change_btn").getelementsbytagname("li");
 for(var i=0; i   focusbtnlist[i].classname="";
 }
}
function focuschange() {
 var focusbtnlist = $("focus_change_btn").getelementsbytagname("li");
  focusbtnlist[0].onmouseo教程ver = function() {
   moveelement("focus_change_list",0,0,5);
   classnormal()
   focusbtnlist[0].classname="current"
  }
  focusbtnlist[1].onmouseover = function() {
   moveelement("focus_change_list",-450,0,5);
   classnormal()
   focusbtnlist[1].classname="current"
  }
  focusbtnlist[2].onmouseover = function() {
   moveelement("focus_change_list",-900,0,5);
   classnormal()
   focusbtnlist[2].classname="current"
  }
  focusbtnlist[3].onmouseover = function() {
   moveelement("focus_change_list",-1350,0,5);
   classnormal()
   focusbtnlist[3].classname="current"
  }
}
setinterval("autofocuschange()", 5000);
function autofocuschange() {
 var focusbtnlist = $("focus_change_btn").getelementsbytagname("li");
 for(var i=0; i   if (focusbtnlist[i].classname == "current") {
   var currentnum = i;
  }
 }
 if (currentnum==0 ){
  moveelement("focus_change_list",-450,0,5);
  classnormal()
  focusbtnlist[1].classname="current"
 }
 if (currentnum==1 ){
  moveelement("focus_change_list",-900,0,5);
  classnormal()
  focusbtnlist[2].classname="current"
 }
 if (currentnum==2 ){
  moveelement("focus_change_list",-1350,0,5);
  classnormal()
  focusbtnlist[3].classname="current"
 }
 if (currentnum==3 ){
  moveelement("focus_change_list",0,0,5);
  classnormal()
  focusbtnlist[0].classname="current"
 }
}
window.onload=function(){
 focuschange();
}
</script>



 
 
 
 
 
 
 
 
 
 
 
 

  •  
     
     
     
     



    http://www.111cn.net/" target="_blank" style="font-size:14px; color:#003366; margin-left:180px;">整理自壹聚教程网

  • 源码下载地址
    http://down.111cn.net/down/code/js/xiangcedaima/2010/0911/20752.html

    本文来源:http://www.gdgbn.com/bangongshuma/26945/