gpt4 book ai didi

jquery - 单击按钮显示打开对话框

转载 作者:太空宇宙 更新时间:2023-11-04 16:23:35 25 4
gpt4 key购买 nike

我必须在单击按钮时显示一个 Open Dialog 框。基本上我必须上传一个文件,为此我正在使用 FileUpload 控件,但我不想向用户显示它而是我想显示一个按钮

最佳答案

    <script type="text/javascript">
$(document).ready(function() {
$("#btn").click(function() {
$("#FileUpload1").click();
return false;
});
});
</script>
<style type="text/css">
.Class { visibility:hidden;}
</style>
</head>
<body>
<form id="form1" runat="server">
<div>
<asp:Button ID="btn" runat="server" Text="Send File"/>
<asp:FileUpload ID="FileUpload1" CssClass="Class" runat="server" />

关于jquery - 单击按钮显示打开对话框,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/6051254/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com