主要是为了显示本地图片咱整啊,兄弟们

解决方案 »

  1.   

    启用AutoPostback,其实还是在服务器端处理
    或者就用客户端脚本,难度比较高
      

  2.   

    是不是这种:
    <!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>
    <meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
    <title>无标题文档</title>
    <script language="javascript">
    function showImg(e)
    {
    var image=new Image(); 
    image.src=e.value;
    document.getElementById("s").style.display = "";
    document.getElementById("s").src = e.value;}
    </script>
    </head><body>
    <form id="form1" name="form1" enctype="multipart/form-data" method="post" action="">
    <img id="s" style="display:none" />
      <input type="file" name="file" onchange="showImg(this);" />
    </form>
    </body>
    </html>
      

  3.   

    <INPUT id="file" onpropertychange="preview.src=this.value;" type="file" name="file" runat="server"><IMG id="preview" height="75" src="images/nopic.gif" width="100" runat="server">
    即可及时显示图片