Previously, I downloaded a jQuery Ajax upload plug-in from the Internet. The left side of the web page is the upload category. The function I want to implement is as follows: I originally planned to create different folders based on the upload category on the server side to save it. file, so this requires passing an upload classification parameter to the background. These upload categories are read from the database and generated using repeater. When one of the categories is clicked, a style is set for it, and the name of the category is saved in a variable uploadCatlog. I can get the classification and pass it to the backend, but the strange thing is that it is correct only the first time, and the parameters are not updated every time thereafter. In fact, uploadCatlog is also used in the onComplete callback function of the upload plug-in, and its value has been updated. I feel like this upload plug-in is only instantiated when clicked for the first time and the parameters are passed to the background, so the values will remain unchanged in the future. How should I solve this problem? The following are the details of my js code:
JavaScript code: