通过普通按钮button打开fileupload控件,为什么点击提交按钮后,fileupload选择的文件路径会消失???? 15
<div><div><asp:FileUploadID="FileUpload2"runat="server"/></div><inputtype="button"val...
<div>
<div >
<asp:FileUpload ID="FileUpload2" runat="server" /></div>
<input type="button" value="上传图片" onclick="document.getElementById('<%= FileUpload2.ClientID %>').click();
document.getElementById('msg2').innerHTML=document.getElementById('<%= FileUpload2.ClientID %>').value;" /><br />
<div id="msg2">
</div>
</div>
< div style="padding-left: 126px;">
<asp:ImageButton ID="btn_save" runat="server" ImageUrl="~/Resources/images/manager1_26.gif"
OnClick="btn_save_Click" />
</div> 展开
<div >
<asp:FileUpload ID="FileUpload2" runat="server" /></div>
<input type="button" value="上传图片" onclick="document.getElementById('<%= FileUpload2.ClientID %>').click();
document.getElementById('msg2').innerHTML=document.getElementById('<%= FileUpload2.ClientID %>').value;" /><br />
<div id="msg2">
</div>
</div>
< div style="padding-left: 126px;">
<asp:ImageButton ID="btn_save" runat="server" ImageUrl="~/Resources/images/manager1_26.gif"
OnClick="btn_save_Click" />
</div> 展开
2个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询