站内搜索: 请输入搜索关键词

当前页面: JAVA 编程资料牛鼻论坛AJAX & JavaScript 技术→编程问题--关于JS的

编程问题--关于JS的

发表新主题   回复此主题

第1楼 2007-05-09 18:19 烽火 写道:

编程问题--关于JS的


<!--
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 = 180;
this._h = 160;
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 #333333;"><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);" ) + '">';
_html += '<img id="rotatorPic" src="' + _p[_c] + '"'
+ ' width="' + _w + '"'
+ ' height="' + _h + '"'
+ (_t[_c]?' title="' + _t[_c] + '"':'')
+ ' style="border:1px solid #000000;FILTER:revealTrans(transition=' + _x + ',duration=1);"'
+ ' >';
//_html += (_t[_c]?('<div align="center">' + (_c+1) + '. ' + _t[_c] + '</div>'):'<p></p>');
_html += '</a>';
_html += "</div>";
_html += '<div align="right" style="margin:2px 0 0 0;">';

for(var i=0; i<_p.length; i++)

第2楼 2013-08-31 12:44 Robot :

编程问题--关于JS的 相关


第3楼 2007-05-09 19:35 magicshd 写道:

与FILEFOX浏览器中的javascript客户端版本问题


发表新主题   回复此主题