惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

量子位
博客园_首页
Google DeepMind News
Google DeepMind News
博客园 - Franky
The GitHub Blog
The GitHub Blog
GbyAI
GbyAI
有赞技术团队
有赞技术团队
Microsoft Azure Blog
Microsoft Azure Blog
G
Google Developers Blog
Recent Announcements
Recent Announcements
A
About on SuperTechFans
博客园 - 【当耐特】
博客园 - 三生石上(FineUI控件)
酷 壳 – CoolShell
酷 壳 – CoolShell
美团技术团队
罗磊的独立博客
IT之家
IT之家
博客园 - 聂微东
Stack Overflow Blog
Stack Overflow Blog
Jina AI
Jina AI
腾讯CDC
P
Proofpoint News Feed
Hugging Face - Blog
Hugging Face - Blog
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com

博客园 - gwazy

wifi zigbee 蓝牙区别 easyui textbox 获取焦点 easyUI 异步加载树 sql 有条件计数 easyui combox 手动添加项 除湿方法 android 页面跳转,数据回传 android studio 乱码 android studio 工具 gridlaylout 简单布局 android 开发 简单的页面布局 android sdk 重装windows7企业版时提示“安装程序无法创建新的系统分区,也无法定位现有系统 csdn 泄露用户密码害人不浅啊。 PoolMon 使用 固态硬盘相关知识 android 平台搭建 win8 中使用第三方无线网卡出现无线连接受限解决办法 iis 故障导致网站无法访问
只有设置了 name 属性的表单元素才能在提交表单时传递它们的值
gwazy · 2017-07-18 · via 博客园 - gwazy
     $(function () {

            var wait = $("<img src=\"\" alt=\"正在上传\"/>");
            $("#File1").change(function () {

                $("#form1").ajaxSubmit({
                    url: '/Provider/HandlerUpOneFile.ashx?path=1',
                    beforeSubmit: function () {

                    },
                    success: function (data) {
                        $("#File1").attr("src", data);
                        // alert( $("#File1").attr("src"));
                        alert(data);

                    }
                });
            });
        });
      <form id="form1" method="post" enctype="multipart/form-data" >
          <div class="easyui-panel" style="padding:10px;"> 选择文件 
      
               <input  type="file" id="File1" name="File1" /> 注意此处 name 必须设置否则无法获取
          
              <a class="easyui-linkbutton" data-options="iconCls:'icon-ok'" href="javascript:void(0)" onclick="LoadData()">上传文件</a>

</div></form>

name 属性规定 input 元素的名称。

name 属性用于对提交到服务器后的表单数据进行标识,或者在客户端通过 JavaScript 引用表单数据。

注释:只有设置了 name 属性的表单元素才能在提交表单时传递它们的值。