渡//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
>
側邊欄廣告 title>
#show { 寬度:100px;高度:80px;背景:#0f0;位置:固定; _位置:絕對;右:0px;頂部:0px ;}
window.onscroll = window.onresize = window.onload = function(){
var oDiv = document.getElementById("show");
var sTop = document.documentElement.scrollTop ||文檔.body.scrollTop;
var cHeight= document.documentElement.clientHeight ||.body.body.clientHeight // oDiv.style.top = parseInt(sTop mid) "px"; // 理論上應該只假設這句話就可以居中吧
// 實際上的四大瀏覽器只認識下面這個if判斷
if(navigator.appVersion.indexOf("MSIE 6") > -1){
oDiv.style.top = parseInt( sTop mid) "px";
}else{
oDiv.style.top =mid "px";
}
}