The jQuery plug-in AjaxFileUpload is used to upload ajax files. this plug-in is very simple to use. Next let's look at how to use the AjaxFileUpload plug-in to upload files, if you have any need, refer to ajaxFileUpload as a jQuery plug-in for asynchronous file upload.
Upload a version that you don't know, so you don't need to find it in the future.
Syntax: $. ajaxFileUpload ([options])
Options parameter description:
1. url Upload handler address.
2. the ID of the file field to be uploaded by fileElementId, that is.
3. whether secureuri enables secure submission. the default value is false.
4. data type returned by the dataType server. It can be xml, script, json, or html. If this parameter is left blank, jQuery will automatically judge it.
5. the processing function automatically executed after successful submission of success. the parameter data is the data returned by the server.
6. the processing function automatically executed when the error is submitted.
7. Custom data parameters. This is useful when data is related to uploaded images.
8. if you want to submit a custom parameter, set this parameter to post.
Error message:
1. SyntaxError: missing; before statement error
If this error occurs, check whether the url path can be accessed.
2. SyntaxError: syntax error
If this error occurs, check whether the server background processing program that handles the submitted operation has a syntax error.
3, SyntaxError: invalid property id error
If this error occurs, check whether the text domain property ID exists.
4, SyntaxError: missing} in XML expression error
If this error occurs, check whether the file name is consistent or does not exist.
5. other custom errors
You can directly print the variable $ error to check whether the parameters are correct, which is much more convenient than the above error prompts.
The above is all the content of this article. I hope you will like it.