System Information

Impossible Is Nothing...

导航

统计

如何在上传图片之前预览图片?

1 Page_Load()
2 {
3           this.FileUpload1.Attributes.Add("onchange""document.getElementById('" + this.Image1.ClientID + "').src=document.getElementById('" + this.FileUpload1.ClientID + "').value");
4 
5 }
1         <asp:FileUpload ID="FileUpload1" runat="server" />
2         <br />
3         <asp:Image ID="Image1" runat="server" />
4         <br />
5         <asp:Button ID="Button1" runat="server" Text="Button" OnClick="Button1_Click" />
6 

posted on 2006-04-20 22:36 SysInfo 阅读(...) 评论(...) 编辑 收藏