jquery for uploading images

Source: Internet
Author: User

I've packed all the files I've used and downloaded them myself:

Https://files.cnblogs.com/files/lguow/lib.rar

The core code is as follows:

<inputtype= "hidden"name= "Avatar"ID= "Avatar"><imgsrc=""alt=""ID= "Avatarshow"width= "200px"Height= "200px"><span>Upload Avatar</span><inputtype= "File"name= "File"ID= "File"onchange= "uploadimg ();"  ><Script>functionuploadimg () {Debugger; if($("#file"). Val ()!= ""{$.ajaxfileupload ({type:"POST", URL:"/selfsuperxxxxx/uploadfile",//Background InterfaceDataType:"JSON", Fileelementid:"file",  //the ID of the fileSuccess:function(d) {if(D.code== 0) {js.showmessage ("Upload Successful"); //Picture Display                    $("#avatar"). attr ("value", D.data.url); $("#avatarShow"). attr ("src", D.data.url); }}, Error:function() {Js.showmessage ("Upload failed");    },        }); } Else{js.showmessage ("Please select a file first"); }}</script.

The number of words to use ..... The word count is used for ......... ............. The number of words to be used ......... ..... The number of words to be used ........ ....... The number of words used ... The number of words used ..... The number of words to be used ....... ..... The number of words used ..... The number of words with the number of words with the number of words with

jquery for uploading images

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.