用Javascript做flash做的事..才完成的一个类.Auntion Action var 0.1
2018-10-15 17:29
                        请注意example2.html在firefox下效果没有在ie下圆润,其原因来源于兼容性. 
以及触发动作过快会导致每一个li递增两次到三次的情况,这个原因跟类(Action.js)本身无关.原因来源于example2.html中的演示代码. 
目前正在极力修改中. 
咨询改版升级信息请关注我的blog 
或者加我QQ询问:82874972
action.js
复制代码 代码如下:
/* 
* 
效果类 
ByAuntion 
QQ:82874972 
版权没有,随便使用. 
使用时请勿删除此部分注释.谢谢! 
* 
*/ 
language.js
复制代码 代码如下:
/* 
* 
语言扩展包 
ByAuntion 
QQ:82874972 
版权没有,随便使用. 
使用时请勿删除此部分注释.谢谢! 
* 
*/ 
example.html 
复制代码 代码如下:
<!DOCTYPEhtmlPUBLIC-//W3C//DTDXHTML1.0Transitional//EN
<htmlxmlns=
<head> 
<metahttp-equiv=Content-Typecontent=text/html;charset=gb2312/> 
<title>example1</title> 
<scriptsrc=Language.jslanguage=javascript></script> 
<scriptsrc=Action.jslanguage=javascript></script> 
<styletype=text/css> 
*,body{ 
font-family:Arial,Helvetica,sans-serif; 
font-size:12px; 
} 
#main{ 
margin:50px; 
padding:0px0px20px0px; 
border:solid1px#cccccc 
} 
#button{ 
color:#0099FF; 
} 
#buttonli{ 
margin-right:10px; 
padding:5px000; 
width:104px; 
height:22px; 
border:solid1px#cccccc; 
background-color:#eeeeee; 
float:left; 
text-align:center; 
} 
#demo{ 
margin-top:20px; 
background-color:#CCCCCC; 
color:#f5f5f5; 
float:inherit; 
/*border:solid1px#aaaaaa;*/ 
} 
</style> 
</head> 
<body> 
<tableborder=0align=centercellpadding=0cellspacing=0> 
<tr> 
<td> 
<divid=button> 
<ul> 
<liid=a>恢复初始值</li> 
<liid=b>隐藏</li> 
<liid=c>宽+30</li> 
<liid=d>高+30</li> 
<liid=e>宽-30</li> 
<liid=f>高-30</li> 
<liid=i>宽600,高100</li> 
</ul> 
</div> 
</td> 
</tr> 
</table> 
<tableborder=0align=centercellpadding=0cellspacing=0> 
<tr><tdalign=centervalign=middle> 
<divid=demostyle=height:200px;width:200px;></div> 
</td></tr></table> 
<scriptlanguage=javascripttype=text/javascript> 
varelement=$id(demo); 
varwidth=element.offsetWidth; 
varheight=element.offsetHeight; 
alert(width) 
varstep=0.115 
functionnow(){ 
this.nowWidth=element.style.width.toInt(); 
this.nowHeight=element.style.height.toInt(); 
} 
$id(a).onmousedown=function(){ 
newShowHide(element,width,height,0,step); 
} 
$id(b).onmousedown=function(){ 
newShowHide(element,0,0,0,step); 
} 
$id(c).onmousedown=function(){ 
vartest=newnow(); 
newShowHide(element,test.nowWidth+30,null,0,step); 
} 
$id(d).onmousedown=function(){ 
vartest=newnow(); 
newShowHide(element,null,test.nowHeight+30,0,step); 
} 
$id(e).onmousedown=function(){ 
vartest=newnow(); 
newShowHide(element,test.nowWidth-30,null,0,step); 
} 
$id(f).onmousedown=function(){ 
vartest=newnow(); 
newShowHide(element,null,test.nowHeight-30,0,step); 
} 
$id(i).onmousedown=function(){ 
newShowHide(element,600,100,0,step) 
} 
</script> 
</body> 
</html> 
                    
文章标题:用Javascript做flash做的事..才完成的一个类.Auntion Action var 0.1
文章链接:http://soscw.com/index.php/essay/18663.html