background image

Inherits="_Default" %>

<!DOCTYPE   html   PUBLIC   "-//W3C//DTD   XHTML   1.0   Transitional//EN" 
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
    <title>图片格式转换</title>
    <script language="javascript">
     function show_img()//实现选择图片后立即显示给客户
        {
        
        if(document.all.TextBox1.value=="0"){//开始为 0,转换后为 1
        document.all.Image1.src=document.all.FileUpload1.value;
        }
        else if(document.all.TextBox1.value=="1")
        {
        }
        }
    </script>
</head>
<body>
    <form id="form1" runat="server">
    <div>
        &nbsp;
        <table>
            <tr>
                <td style="width: 124px">
                    <asp:FileUpload ID="FileUpload1" runat="server" onmouseover="show_img()" 
Width="349px"/>&nbsp;
                </td>
                <td style="width: 100px">
                    格式<asp:DropDownList ID="DropDownList1" runat="server">
                        <asp:ListItem>GIF</asp:ListItem>
                        <asp:ListItem>Jpeg</asp:ListItem>
                        <asp:ListItem>Bmp</asp:ListItem>
                        <asp:ListItem>Png</asp:ListItem>
                        <asp:ListItem>Ico</asp:ListItem>
                    </asp:DropDownList>
                </td>
                <td style="width: 100px">
                    <asp:Button ID="Button1" runat="server" OnClick="Button1_Click" Text="转
换" /></td>
                <td style="width: 100px">