<!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>