H

Top으로 ver2

· 2006-03-29 (수) 17:12:35 · 2738
몇가지 섞어봤습니다.

"M$", "불여우.." 모두 잘 되구요. Mac에서는 "Mac용 M$ El(5.2)"에서는 죽어도 안되는군요. "Mac 사파리"는 잘됩니다.

============================================================


<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<head>
<title> Top으로 </title>
<meta name="Generator" content="EditPlus">
<meta name="Author" content="">
<meta name="Keywords" content="">
<meta name="Description" content="">
<script language="JavaScript">
<!--

function back_top() {
x = document.body.scrollLeft;
y = document.body.scrollTop;
step = 2;

while ((x != 0) || (y != 0)) {
scroll (x, y);
step += (step * step / 100);
x -= step;
y -= step;
if (x < 0) x = 0;
if (y < 0) y = 0;
}
scroll (0, 0);
}

//top 버튼 용 레이어 생성
var verticalpos="frombottom";
document.write('<div style="z-index:0; width:100%; height:0px; position:absolute; display:block;">');
document.write(' <table width="900" height="0" border="0" align="center">'); // FIXED시킬 내용의 가로폭
document.write(' <tr>');
document.write(' <td>');
document.write(' <div id="divStayTopLeft" style="z-index:0; width:55px; height:13px; position:relative; display:none;">');
document.write(' <layer id="divStayTopLeft">');
document.write(' <img src="btn_top_001.gif" width="42" height="18" border="0" onClick="javascript:back_top();" onFocus="this.blur()" style="cursor:pointer;">');
document.write(' </layer>');
document.write(' </div>');
document.write(' </td>');
document.write(' </tr>');
document.write(' </table>');
document.write('</div>');

function TopDiv(path) {

var objTop = document.getElementById("divStayTopLeft");
objTop.style.display = "block";

var startX = 860; //X축 위치
startY = 100; //브라우저 하단에서의 위치

var ns = (navigator.appName.indexOf("Netscape") != -1);
var d = document;

function ml(id) {

var el=d.getElementById?d.getElementById(id):d.all?d.all[id]:d.layers[id];

if(d.layers)el.style=el;

el.sP=function(x,y){this.style.left=x;this.style.top=y;};
el.x = startX;

if (verticalpos=="fromtop")
el.y = startY;
else{
el.y = ns ? pageYOffset + innerHeight : document.body.scrollTop + document.body.clientHeight;
el.y -= startY;
}

return el;
}

window.stayTopLeft=function() {

if (verticalpos=="fromtop"){
var pY = ns ? pageYOffset : document.body.scrollTop;
ftlObj.y += (pY + startY - ftlObj.y)/8;
}

else{
var pY = ns ? pageYOffset + innerHeight : document.body.scrollTop + document.body.clientHeight;
ftlObj.y += (pY - startY - ftlObj.y)/8;
}

ftlObj.sP(ftlObj.x, ftlObj.y);
setTimeout("stayTopLeft()", 10);

}

ftlObj = ml("divStayTopLeft");
stayTopLeft();

}

//-->
</script>

</head>

<body onload="TopDiv();">
<table width="900" height="0" border="1" align="center">
<tr>
<td>
내용<br>내용<br>내용<br>내용<br>내용<br>내용<br>내용<br>내용<br>내용<br>내용<br>내용<br>내용<br>내용<br>내용<br>내용<br>내용<br>내용<br>내용<br>내용<br>내용<br>내용<br>내용<br>내용<br>내용<br>내용<br>내용<br>내용<br>내용<br>내용<br>내용<br>내용<br>내용<br>내용<br>내용<br>내용<br>내용<br>내용<br>내용<br>내용<br>내용<br>내용<br>내용<br>내용<br>내용<br>내용<br>내용<br>내용<br>내용<br>내용<br>내용<br>내용<br>내용<br>내용<br>내용<br>내용<br>내용<br>내용<br>내용<br>내용<br>내용<br>내용<br>내용<br>내용<br>내용<br>
</td>
</tr>
</table>
</body>
</html><div class='small'>[이 게시물은 관리자님에 의해 2011-10-31 17:16:08 PHP & HTML에서 이동 됨]</div>

첨부파일

top v.2.zip (1.6 KB) 14회 2006-03-29 17:12
|
댓글을 작성하시려면 로그인이 필요합니다.

프로그램

8,188건
+
제목 글쓴이 날짜 조회
06-06-08 조회 4,013
06-05-31 조회 3,231
06-05-30 조회 3,686
06-05-29 조회 5,404
06-05-20 조회 6,424
06-05-20 조회 7,789
06-05-13 조회 3,666
06-05-13 조회 3,565
06-05-13 조회 3,298
06-05-13 조회 3,384
06-05-10 조회 3,359
06-05-02 조회 3,158
06-05-01 조회 3,168
06-05-01 조회 3,075
06-05-01 조회 2,986
06-05-01 조회 2,991
06-05-01 조회 3,142
06-05-01 조회 4,303
06-05-01 조회 4,150
06-04-30 조회 3,966
06-04-30 조회 3,641
06-04-29 조회 3,727
06-04-29 조회 3,381
06-04-29 조회 3,434
06-04-29 조회 3,796
06-04-28 조회 3,198
06-04-28 조회 5,058
06-04-28 조회 3,586
06-04-28 조회 4,198
06-04-28 조회 3,341
06-04-27 조회 4,137
06-04-27 조회 3,331
06-04-26 조회 4,207
06-04-26 조회 4,586
06-04-25 조회 6,295
06-04-25 조회 4,183
06-04-20 조회 3,941
06-04-17 조회 5,099
06-04-12 조회 3,484
06-04-11 조회 3,851
06-04-08 조회 4,725
06-03-17 조회 3,987
06-03-15 조회 4,661
06-03-06 조회 5,415
bbbking
05-11-05 조회 6,767
05-09-23 조회 5,079
05-08-25 조회 6,801
05-07-29 조회 5,065
05-07-05 조회 6,478
05-06-28 조회 6,828
05-06-20 조회 4,555