Method:
Copy codeThe Code is as follows:
$. AjaxFileUpload ({
Data: {"a": 123, "B": 456}; // additional parameter, in json format
});
Then modify the two functions in the ajaxFileUpload. js file, which is actually a function (add new parameters to the function)
Article 1:
Copy codeThe Code is as follows:
CreateUploadForm: function (id, fileElementId, data) {} is greater than 26 rows.
Then add the following code to the function body:
Copy codeThe Code is as follows:
If (data ){
For (var I in data ){
$ ('<Input type = "hidden" name = "' + I + '" value = "' + data [I] + '"/> '). appendTo (form );
}
}
Code purpose: Process json data and add the input type = 'hidd' to the form.
Second:
Copy codeThe Code is as follows:
AjaxFileUpload (){}
Var form = jQuery. createUploadForm (id, s. fileElementId, s. data); you can modify this line by adding one more parameter.
The modification here is actually about the function call parameters.