社区
JavaScript
帖子详情
jquery ajax submit form中包括一个input file
再出发666
2010-01-29 12:38:50
如题
...全文
226
3
打赏
收藏
jquery ajax submit form中包括一个input file
如题
复制链接
扫一扫
分享
举报
写回复
配置赞助广告
3 条
回复
切换为时间正序
请发表友善的回复…
发表回复
打赏红包
mykelly6
2010-01-29
打赏
举报
回复
看下这个iframe的提交吧
http://www.cnblogs.com/cloudgamer/
eduyu
2010-01-29
打赏
举报
回复
file无法通过ajax提交,因为js无法访问本地文件,但file可以无刷新的提交,一般是通过隐藏的iframe来做。
xmliy
2010-01-29
打赏
举报
回复
file 无法通过ajax提交
相关推荐
EasyUI
中
使用
Ajax
提交文件表单
HTML代码:<
form
id="
file
Form
" enctype="multipart/
form
-data" method="post"> <
input
type="
file
" id="
file
" name="
file
" style="width: 200px">
form
>
jquery
代码:$('#
file
Form
').
form
('
submit
', { url:"····
ajax
的各种用法,
包括
原生和
Jquery
form
数据的序列化: $('#
submit
').click(function(){ $('#
form
').serialize(); //会根据
input
里面的name,把数据序列化成字符串;eg:name=yang $('#
form
').serializeArray(); //会根据
input
里面的name,把数据序列化成数组;eg:[objec...
Jquery
Ajax
拼接字符串url
Jquery
拼接
input
中
字符串,然后
Ajax
。 HTML: 1 <
form
id="my
Form
1" action="#"> 2 <
input
name="name"/> 3 <
input
name="dec"/> 4 <
input
type="
submit
"/> 5 </
form
> JS: ...
ajax
上传文件
上传文件有两种方式,一种是常用的表单提交:<
form
id= "
Form
" action= "
file
/upload" method= "post" enctype ="multipart/
form
-data"> <
input
type = "
file
" /> <
input
type ="
submit
" value="上传"/>
form
> 还有一种是用
ajax
来
PHP
中
ajax
返回xml数据,PHP - 使用
ajax
提交表单,并返回XML
我有麻烦提交我的表单使用
jQuery
/
AJAX
,并返回成功消息+ XML文件(在PHP
中
生成)。这是我现在拥有的:invoice.php: /* Populate the
form
with
input
later on. For now, the XML data is hardcoded in PHP */ ?>
Submit
form
//
Submit
the
form
:$('#inv...
发帖
JavaScript
JavaScript
Web 开发 JavaScript
复制链接
扫一扫
8.7w+
社区成员
22.4w+
社区内容
Web 开发 JavaScript
社区管理员
加入社区
获取链接或二维码
帖子事件
创建了帖子
2010-01-29 12:38
社区公告
暂无公告