当前位置: 代码迷 >> JavaScript >> 急救!解决思路
  详细解决方案

急救!解决思路

热度:353   发布时间:2012-02-07 17:45:36.0
急救!!!!!
<HTML>
<HEAD>

<META   NAME= "Generator "   CONTENT= "EditPlus ">
<META   NAME= "Author "   CONTENT= " ">
<META   NAME= "Keywords "   CONTENT= " ">
<META   NAME= "Description "   CONTENT= " ">
<meta   http-equiv= "Content-Type "   content= "text/html;   charset=gb2312 "> </HEAD>
<BODY   bgcolor= "#ff6c00 ">
<div   id=AdRotator> </div>
<SCRIPT   LANGUAGE= "JavaScript ">
<!--
function   adRotator()   {};
adRotator.initialize=function(o)
{
//   script   by   blueDestiny
this._t   =   new   Array();
this._l   =   new   Array();
this._p   =   new   Array();
this._i   =   new   Image();
this._c   =   0;
this._f   =   false;
this._o   =   o;
this._timeout   =   null;
this._html   =   " ";
//   configration.
//   @   image   width
//   @   image   height
//   @   rotator   speed
//   @   filter   type
this._w   =   200;
this._h   =   133;
this._s   =   4;
this._x   =   23;
return   this;
};
adRotator.add=function(p,t,l)   {   with   (this)
{
_p.push(p);
_t.push(t);
_l.push(l);
}};
adRotator.load=function()   {   with   (adRotator)
{
if(   _i.readyState== 'complete '   )
{
if(_p.length-1==_c)
{
_f   =   true;
_c   =   0;
window.clearTimeout(_timeout);
//getRef( "AdRotator ").innerHTML= "complete ";
adRotator.play();
}
else
{
_c++;
getRef(_o).innerHTML= "total   images   "   +   _p.length   +   ",   loading   picture   "   +   _c   +   '   '   +   _i.readyState   +   "... ";
_timeout=window.setTimeout(adRotator.load,10)
}
}
else
{
getRef(_o).innerHTML= "total   images   "   +   _p.length   +   ",   loading   picture   "   +   _c   +   '   '   +   _i.readyState   +   "... ";
_timeout=window.setTimeout(adRotator.load,10)
}
}};
adRotator.play=function()   {   with   (adRotator)
{
if(   _f   )
{
_html   =   " ";
_html   +=   ' <table   style= "border:1px   solid   #ffffff; "> <tr> <td   style= "font-size:9pt;font-family:tahoma;font-weight:bold; "> '
_html   +=   ' <div   id= "rotatorPlayer " '
+   '   style= "width: '   +   _w   +   ' '
+   ';height: " '   +   _h   +   ' " '
+   '> '
_html   +=   ' <a   href= " '   +   (   _l[_c]   ?   _l[_c]   :   "javascript:void(0   target=_blank); "   )   +   ' "> ';
_html   +=   ' <img   border=0   id= "rotatorPic "   src= " '   +   _p[_c]   +   ' " '
  相关解决方案