How can I create a file upload using jQuery and ph

2019-07-27 11:13发布

how can i create a jQuery multiple image upload(upload without refresh page after choose file only displaying image not insert to databse) and submit additional Form Data and submit all with click on button without refresh page data insert to database. jquery and php?

like:
There is in tag form: checkbox, input:text, input:textarea, selection:option and input:file

Upload with PHP know,but do not know upload with jQuery.
Where do I start and what should I use?
give me link would tutorial or explain?
i not use of plugin, and not want get from it idea.

With respect

3条回答
一夜七次
2楼-- · 2019-07-27 11:52

I use plupload. Its really simple to use.

Here is the demo page.

Sample code from one of my apps:

uploader = new plupload.Uploader({
                    runtimes: 'html5,gears,flash,silverlight,browserplus',
                    browse_button: 'browse',
                    drop_element: 'uploadContainer',
                    container: 'uploadContainer',
                    max_file_size: '10mb',
                    multi_selection: false,
                    url: 'someFile.php',
                    flash_swf_url: 'http://www.plupload.com/plupload/js/plupload.flash.swf',
                    silverlight_xap_url: 'http://www.plupload.com//plupload/js/plupload.silverlight.xap',
                    filters: [{ title: "Image files", extensions: "jpg,gif,png" },
                              { title: "Pdf files", extensions: "pdf"}]
                });
查看更多
看我几分像从前
3楼-- · 2019-07-27 11:53
神经病院院长
4楼-- · 2019-07-27 12:08

Use JQuery Ajax File Upload. On server side look for your file in request.

查看更多
登录 后发表回答