1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
| <html>
<head>
<title>High Light</title>
<script>
function fadeIn( _param, _type )
{
if ( _param > 255 )
{
return 0;
}
if (_param <= 10)
{
_type = 0;
}
_param += _type == 1 ? -10 : 10;
document.getElementById("elem").style.backgroundColor = 'rgb(250, 250, '+_param+')';
setTimeout("fadeIn("+_param+","+_type+")", 40 );
}
</script>
</head>
<body>
<div id="elem">Test</div>
<input type="button" value="test" onclick="fadeIn(255, 1)"/>
</body>
</html> |