日期:2014-05-16  浏览次数:20331 次

......
大裁员,一段时间来不了了。。。郁闷~~~88了

                                                                                              igyhi
                                                                                              2007.04.27

=========================一段未完的代码     留个纪念   ====================================
/*颜色渐变应用
*String/int   id 对象id号
*String/Object   p 要渐变颜色的Html元素
*int d 渐变跨度1-255
*/
function   NorthStar(id,p,d)
{
this.id=id;
this.tarE=p;
this.degree=d;
this.thread=null;
}
NorthStar.prototype.colorCalculate=function(col,flag)
{
//flag==1时,把10进制数组col转换成颜色串值,flag==0,把col颜色串值转换成10进制数组值
if   (flag)
return   "# "   +   c[0].toColorPart()+   c[1].toColorPart()+   c[2].toColorPart();
else  
{
var   a   =   c.match(/^(#)(.{2})(.{2})(.{2})$/)   ||   c.match(/^(rgb)\((\d{1,3}),   (\d{1,3}),   (\d{1,3})\)$/),   n   =   (a[1]   ==   "# "   ?   16   :   10);
return   [parseInt(a[2],   n),   parseInt(a[3],   n),   parseInt(a[4],   n)];
}
}
NorthStar.prototype.startSwitch=function()
{
var   e=$(this.tarE);
var   bgStrValue=e.style.background;
var   bgArrValue=this.colorCalculate(bgStrValue,0);
e.style.background=this.colorCalculate(this.startInit(bgArrValue),1);
thread=window.setInterval(function(){this.callback(pE);},2);
}
NorthStar.prototype.startInit=function(bgArrV)
{
bgArrV[0]=bgArrV[0]-this.degree> =0?bgArrV[0]-this.degree:0;
bgArrV[1]=bgArrV[1]-this.degree> =0?bgArrV[1]-this.degree:0;
bgArrV[2]=bgArrV[2]-this.degree> =0?bgArrV[2]-this.degree:0;
}
NorthStar.prototype.callback=function()
{

}

------解决方案--------------------
希望你好運!
也希望自己好運!