script.aculo.us组合效果

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>EffectAssembledTest.html</title>
<script type="text/javascript" src="prototype.js"></script>
<script type="text/javascript" src="scriptaculous.js"></script>
<style type="text/css">
.class1{
color: #345456;
font-weight: 800;
font-size: 30px;
background-color: #12ff56;
width: 300px;
}
</style>
</head>

<body>
<div id="div" class="class1">
<div>
This is a test.
</div>
</div>
<select id="sel">
<option value="Effect.Appear">Effect.Appear</option>
<option value="Effect.Fade">Effect.Fade</option>
<option value="Effect.Puff">Effect.Puff</option>
<option value="Effect.DropOut">Effect.DropOut</option>
<option value="Effect.Shake">Effect.Shake</option>
<option value="Effect.SwitchOff">Effect.SwitchOff</option>
<option value="Effect.BlindDown">Effect.BlindDown</option>
<option value="Effect.BlindUp">Effect.BlindUp</option>
<option value="Effect.SlideDown">Effect.SlideDown</option>
<option value="Effect.SlideUp">Effect.SlideUp</option>
<option value="Effect.Pulsate">Effect.Pulsate</option>
<option value="Effect.Squish">Effect.Squish</option>
<option value="Effect.Fold">Effect.Fold</option>
<option value="Effect.Grow">Effect.Grow</option>
<option value="Effect.Shrink">Effect.Shrink</option>
</select>
<input type="button" οnclick="test()" value="click" />
<select id="sel2">
<option value="slide">slide</option>
<option value="blind">blind</option>
<option value="appear">appear</option>
</select>
<input type="button" οnclick="test2()" value="click" />
</body>
<script type="text/javascript">
//测试15种组合特效
function test () {
var strScript = $F("sel") + "('div');";
//运行特效
eval(strScript);
}

//测试Effect.toggle方法
function test2 () {
//生成执行特效脚本
var strScript = "Effect.toggle('div', '" + $F("sel2") + "');";
eval(strScript);
}
</script>
</html>
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值