<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>

解决方案 »

  1.   

    <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>
      

  2.   

    如何用javascript 或 java 得到一个.wav文件的音频采样大小,音频采样级别。如8位8kHz
    如能改变这些属性更好
    谢谢