다음과 같이 코드 코드를 복사하십시오.
<!
<html xmlns = "http://www.w3.org/1999/xhtml">
<헤드>
<meta http-equiv = "content-type"content = "text /html; charset = utf-8" /> />
<title> 사이드 바 광고 </title>
<스타일 유형 = "텍스트/CSS">
{width : 80px;
</스타일>
<script type = "text/javaScript">
window.onscroll = window.onresize = window.onload = function () {{)
var odiv = document.getElementById ( "show");
var stop = document.documentElement.scrolltop ||
다섯
varm mid = (cheight -odiv.offsetheight) / 2;
// odiv.style.top = parseint (stop + mid) + "px";
// 실제로 주요 브라우저는 다음과 같은 경우 만 알고 있습니다.
if (if (navigator.appversion.indexof ( "msie 6")> -1) {
odiv.style.top = parseint (STOP + MID) + "PX";
} 또 다른 {
odiv.style.top = mid + "px";
}
}