请注意example2.html 在firefox下效果没有在ie下圆润,其原因来源于兼容性.
以及触发动作过快会导致每一个li递增两次到三次的情况,这个原因跟类(Action.js)本身无关.原因来源于example2.html中的演示代码.
目前正在极力修改中.
咨询改版升级信息请关注 我的blog
http://auntion.blogbus.com
或者加我QQ询问:82874972
action.js
nbsp;html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
example1 <script></script>
<script></script>
- 恢复初始值
- 隐藏
- 宽 + 30
- 高 + 30
- 宽 - 30
- 高 - 30
- 宽600,高100
|
<script> <BR>var element = $id("demo"); <br><br>var width = element.offsetWidth; <BR>var height= element.offsetHeight; <br><br>alert(width) <br><br>var step = 0.115 <br><br>function now(){ <BR> this.nowWidth = element.style.width.toInt(); <BR> this.nowHeight= element.style.height.toInt(); <BR>} <br><br> $id("a").onmousedown = function(){ <br><br> new ShowHide(element,width,height,0,step); <br><br> } <br><br> $id("b").onmousedown = function(){ <br><br> new ShowHide(element,0,0,0,step); <br><br> } <br><br> $id("c").onmousedown = function(){ <br><br> var test = new now(); <BR> new ShowHide(element,test.nowWidth+30,null,0,step); <br><br> } <br><br> $id("d").onmousedown = function(){ <br><br> var test = new now(); <BR> new ShowHide(element,null,test.nowHeight+30,0,step); <br><br> } <br><br> $id("e").onmousedown = function(){ <br><br> var test = new now(); <BR> new ShowHide(element,test.nowWidth-30,null,0,step); <br><br> } <br><br> $id("f").onmousedown = function(){ <br><br> var test = new now(); <BR> new ShowHide(element,null,test.nowHeight-30,0,step); <br><br> } <br><br> $id("i").onmousedown = function(){ <br><br> new ShowHide(element,600,100,0,step) <br><br> } <BR></script>