输入文件类型而不提交 [英] input file type without submitting

查看:66
本文介绍了输入文件类型而不提交的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何使用输入文件类型将图像保存到服务器而不提交表单

或reload

how to save image to server using input file type without submitting the form
or reload

推荐答案

我相信你可以使用AJAX要做到这一点。



基本上你还在创建一个帖子请求,但你不用回发或重新加载当前页面就可以了。



使用AJAX上传文件 [ ^ ]
I believe you can use AJAX to do this.

Essentially you're still creating a post request but you'll doing it without posting back or reloading the current page.

Uploading Files with AJAX[^]


你好Mahmoud,



看看: jQuery Ajax文件上传 [ ^ ]



它在第一个解决方案中建议 IFrame 母鸡可能是唯一的解决方案)



但更好的是,它建议在没有IFrame的其他解决方案中上传 AJAX ,这真的是很好,(需要 jQuery HTML5
Hi Mahmoud,

Have a look at: jQuery Ajax File Upload[^]

It suggests an IFrame in the first solution (which back then was probably the only solution)

But better yet, it suggests an AJAX upload in the other solution without an IFrame, which is really nice, (requires jQuery and HTML5)


这篇关于输入文件类型而不提交的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆