<script>
function ShowUpload(){
var i = new Image()
i.src="http://community.csdn.net/images/CSDN_logo.GIF"
var showDiv=document.createElement("DIV");
showDiv.innerHTML='<img src="' + i.src + '"/>';
showDiv.style.position="absolute";
showDiv.style.left=(document.body.offsetWidth)/2 - i.width/2;
showDiv.style.top=(document.body.offsetHeight)/2- i.height/2;
showDiv.style.zIndex=10;
showDiv.style.display="block"
document.body.appendChild(showDiv)
alert(showDiv.style.top)
}
</script>
<body onload="ShowUpload()">
</body>
function ShowUpload(){
var i = new Image()
i.src="http://community.csdn.net/images/CSDN_logo.GIF"
var showDiv=document.createElement("DIV");
showDiv.innerHTML='<img src="' + i.src + '"/>';
showDiv.style.position="absolute";
showDiv.style.left=(document.body.offsetWidth)/2 - i.width/2;
showDiv.style.top=(document.body.offsetHeight)/2- i.height/2;
showDiv.style.zIndex=10;
showDiv.style.display="block"
document.body.appendChild(showDiv)
alert(showDiv.style.top)
}
</script>
<body onload="ShowUpload()">
</body>
function ShowUpload(){
var i = new Image()
i.src="http://community.csdn.net/images/CSDN_logo.GIF"
var showDiv=document.createElement("DIV");
showDiv.innerHTML='<img src="' + i.src + '"/>';
showDiv.style.position="absolute";
showDiv.style.left=(document.body.offsetWidth)/2 - i.width/2;
showDiv.style.top=(document.body.offsetHeight)/2- i.height/2;
showDiv.style.zIndex=10;
showDiv.style.display="block"
document.body.appendChild(showDiv)
alert(showDiv.style.top)
}
</script>
<body onload="ShowUpload()">
</body>
如能改变这些属性更好
谢谢