Ajax Upload image

后端 未结 4 1152
失恋的感觉
失恋的感觉 2020-11-22 03:57

Q.1 I would like to convert this form to ajax but it seems like my ajax code lacks something. On submit doesn\'t do anything at all.

Q2. I also want the function to

4条回答
  •  予麋鹿
    予麋鹿 (楼主)
    2020-11-22 04:17

    Here is simple way using HTML5 and jQuery:

    1) include two JS file

    
    
    

    2) include CSS to have cool buttons

    
    

    3) create DIV or SPAN

    4) write this code in your HTML page

    $('.demo').ajaxupload({
        url:'upload.php'
    });
    

    5) create you upload.php file to have PHP code to upload data.

    You can download required JS file from here Here is Example

    Its too cool and too fast And easy too! :)

提交回复
热议问题