<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>삶의향기</title>
<meta http-equiv="Content-Type" content="text/html; charset=euc-kr">
<link rel="stylesheet" href="style.css">
<script>
// 불꽃의 갯수
var debrisnumber=35
// 불꽃의 색깔
var debriscolor=new Array("FF6699","FCC1D4","FF6699","FDDBE6")
</script>
<script>
var x_debrispos
var y_debrispos
var x,y
var x_random=new Array()
var y_random=new Array()
var max_explsteps=20
var i_explsteps=0
var i_color=0
var pause=10
function startexplosion() {
i_explsteps=0
x_debrispos=x
y_debrispos=y
for (i=0;i<=debrisnumber;i++) {
x_random[i]=Math.ceil(40*Math.random())-20
y_random[i]=Math.ceil(40*Math.random())-20
}
if (document.all) {
for (i=0;i<=debrisnumber;i++) {
var thisspan=eval("document.all.span"+i+".style")
thisspan.visibility="VISIBLE"
thisspan.posLeft=x_debrispos
thisspan.posTop=y_debrispos
}
explode_IE()
}
if (document.layers) {
for (i=0;i<=debrisnumber;i++) {
var thisspan=eval("document.span"+i)
thisspan.visibility="VISIBLE"
thisspan.left=x_debrispos
thisspan.top=y_debrispos
}
explode_NN()
}
}
function explode_IE() {
if (i_explsteps<=max_explsteps) {
for (i=0;i<=debrisnumber;i++) {
var thisspan=eval("document.all.span"+i+".style")
thisspan.posLeft+=x_random[i]
thisspan.posTop+=y_random[i]
}
i_explsteps++
var timer=setTimeout("explode_IE()",pause)
}
else {
for (i=0;i<=debrisnumber;i++) {
var thisspan=eval("document.all.span"+i+".style")
thisspan.visibility="HIDDEN"
}
clearTimeout(timer)
}
}
function explode_NN() {
if (i_explsteps<=max_explsteps) {
for (i=0;i<=debrisnumber;i++) {
var thisspan=eval("document.span"+i)
thisspan.left+=x_random[i]
thisspan.top+=y_random[i]
}
i_explsteps++
var timer=setTimeout("explode_NN()",pause)
}
else {
for (i=0;i<=debrisnumber;i++) {
var thisspan=eval("document.span"+i)
thisspan.visibility="HIDDEN"
}
clearTimeout(timer)
}
}
function handlerMM(e){
x = (document.layers) ? e.pageX : document.body.scrollLeft+event.clientX
y = (document.layers) ? e.pageY : document.body.scrollTop+event.clientY
}
if (document.layers){
document.captureEvents(Event.MOUSEMOVE);
}
document.onmousemove = handlerMM;
document.write("<style>")
document.write(".spanstyle {")
document.write("position:absolute;")
document.write("visibility:hidden;")
document.write("}")
document.write("</style>")
for (i=0;i<=debrisnumber;i++) {
document.write("<div id='span"+i+"' class='spanstyle'>")
document.write("<table cellpadding=0 cellspacing=0>")
document.write("<tr><td bgcolor="+debriscolor[i_color]+">")
document.write("<img src='emptypixel.gif' width=3>")
document.write("</td></tr></table>")
document.write("</div>")
i_color++
if (i_color>=debriscolor.length) {i_color=0}
}
</script>
</head>
<body>
<table width="450" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td><div align="center">
<p> </p>
<p> </p>
</div> <p align="left"><a href="http://lia.pe.kr" onMouseOver="startexplosion()"><img src="http://lia.pe.kr/icon/icon/tare_1.gif" border="0"></a></p>
<p align="center"><a href="http://lia.pe.kr" onMouseOver="startexplosion()"><img src="http://lia.pe.kr/icon/icon/tare_2.gif" border="0"></a> </p>
<p align="right"><a href="http://lia.pe.kr" onMouseOver="startexplosion()"><img src="http://lia.pe.kr/icon/icon/sflower13.gif" border="0"></a>
</p>
</td>
</tr>
</table><p align="center"><input type=button name=bt_s value="소스보기" onClick='window.location="view-source:"+window.location.href'>
</body>
</html>
'Javascript' 카테고리의 다른 글
기간대별 메세지 (0) | 2016.05.30 |
---|---|
창이 줄었다 늘엇다 (0) | 2016.05.30 |
노프레임에서 인덱스를 메인으로~ (0) | 2016.05.30 |
자동 넓이 높이 조절하는 iframe (0) | 2016.05.30 |
이미지에만 우측 마우스 금지 (0) | 2016.05.30 |