28,406
社区成员
发帖
与我相关
我的任务
分享
<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
<title>无标题页</title>
<script type="text/javascript" language="javascript">
function $(e)
{
return document.getElementById ? document.getElementById(e) : null;
}
function PreviewImg(o,img)
{
$(img).style.width="120px";
$(img).style.height ="140px";
$(img).filters.item("DXImageTransform.Microsoft.AlphaImageLoader").src=o.value;
$(img).filters.item("DXImageTransform.Microsoft.AlphaImageLoader").sizingMethod='scale';
}
</script>
</head>
<body>
<form id="form1" runat="server">
<div>
<div ID="imgPhoto" style=" width:120px; height:140px;filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='',sizingMethod=scale);cursor: hand;"></div>
<asp:FileUpload ID="upPhoto" onchange="PreviewImg(this, 'imgPhoto');" runat="server" Width="0" BorderWidth="0" align="center" /><br />
支持bmp,jpg格式
</div>
</form>
</body>
</html>
