关于更改file控件中"浏览...." 字样 --上传图片上传即可见的javascript

來自:http://blog.csdn.net/e23/archive/2005/12/20/557536.aspx

<input type="text" name="file1" value="" id="file1"><input type="file" name="photo" id="photo" style="display:none" onchange='document.getElementById("file1").value=this.value'><input type="button" value="Browse" onclick='document.getElementById("photo").click();'>

上传图片上传即可见的javascript 
 <script language="javascript">
 
    function mainChange(Value)

{
flag=false;
document.all.mainimage.width=235;
document.all.mainimage.height=150;
document.all.mainimage.alt="";
document.all.mainimage.src=Value;
}

    </script>

<asp:FileUpload ID="fileUpPhoto" runat="server" Width="237px" onchange='mainChange(this.value)'></asp:FileUpload>



posted @ 2006-11-13 12:22  Nina  阅读(771)  评论(0)    收藏  举报