此段代碼放於<head>...</head>之間

<style type="text/css">#newPreview {}{
FILTER: progidXImageTransform.Microsoft.AlphaImageLoader(sizingMethod=scale)
}
</style>
<body>內的代碼
<script language="javascript" type="text/javascript">
function PreviewImg(imgFile)

    var newPreview = document.getElementById("newPreview");
    newPreview.filters.item("DXImageTransform.Microsoft.AlphaImageLoader").src = imgFile.value;
    newPreview.style.width = "80px";
    newPreview.style.height = "60px";
}

</script>

<asp:FileUpload ID="Fud_Pic" runat="server" onchange="PreviewImg(this)"/>
<div id="newPreview"> </div>

goodlucky 發表在 痞客邦 PIXNET 留言(0) 人氣()