脚本说明:
把如下代码加入<body>区域中
<SCRIPT language=JavaScript>
pos = 15;
TO = null;
function shake_funct2(object,speed)
{
obj = eval(object)
txt = clear_space(obj.value);
if (pos == 15)
{
txt = txt + " ";
pos = -15;
}
else
{
txt = " " + txt;
pos = 15;
}
obj.value = txt;
obj.style.width = parseInt(obj.style.width) + pos;
obj = object
sp = speed
TO = setTimeout("shake_funct2(obj,sp)",speed);
}
function clear_space(text)
{
while (text.substring(0,1) == " ")
{
text = text.substring(1,text.length);
}
while(text.substring(text.length-1,text.length) == " ")
{
text = text.substring(0,text.length-1);
}
return text;
}
function end_shake_funct2(object)
{
clearTimeout(TO);
obj = eval(object);
txt = clear_space(obj.value);
obj.value = txt;
if (pos == -15)
{
obj.style.width = parseInt(obj.style.width) +15;
}
pos = 15
}
</SCRIPT>
<FORM name=myform2>
<TABLE border=0>
<TBODY>
<TR>
<TD><span class="STYLE1">一般抖动的按钮</span> </TD>
<TD align=middle width=160><INPUT onmouseover=shake_funct2(this,100) style="FONT-SIZE: 12px; WIDTH: 150px" onmouseout=end_shake_funct2(this) type=button value=一般速度>
</TD></TR>
<TR>
<TD><span class="STYLE2">快速抖动的按钮 </span></TD>
<TD align=middle width=160><INPUT onmouseover=shake_funct2(this,50) style="FONT-SIZE: 12px; WIDTH: 150px" onmouseout=end_shake_funct2(this) type=button value=更快速度>
</TD></TR></TBODY></TABLE></FORM></TD></TR></TBODY></TABLE></CENTER>
鼠标抖动的按钮.rar
需积分: 10 114 浏览量
2010-03-24
10:00:28
上传
评论
收藏 2KB RAR 举报
zhong_jianyu
- 粉丝: 14
- 资源: 484
最新资源
- 机器学习和数据挖掘课程设计-米其林餐厅数据挖掘管理系统源码+使用文档说明.zip
- html html html展示我与ai的对化
- 数据结构课程设计-全国交通出行咨询模拟系统C语言实现源码.zip
- cef-binary-109.0.1+gcd5e37a+chromium-109.0.5414.8-windows32
- 基于C语言的全国交通咨询系统模拟源码.zip
- 正点原子HAL库 STM32F4 DMA(学习自用附源码)
- 炫酷代码雨,超级炫酷哦!!!
- 基于物联网MQTT协议的智能停车场管理系统
- POETIZE个人博客系统源码 - 最美博客
- 基于深度学习的行人检测系统源码+项目说明(YoloV3+Tensorflow).zip
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈