


Detailed explanation of jquery uploadify file upload_javascript skills
After searching online for a day, everyone said that Uploadify’s only shortcoming is that it does not support Chinese buttons. Before that, I took a look at Uploadify’s API and found a few parameters that were not mentioned by everyone. This is the solution. The key to this issue. (In the future, we will resolutely develop the habit of checking the API when nothing happens)
Uploadify has a parameter called buttonText. No matter how you change it, it does not support Chinese because the plug-in uses a transcoding method in js to transcode the value of this parameter. Yes, the decoding place is in the swf file, and the code cannot be seen, so this method cannot be used.
Another parameter, rarely mentioned on the Internet, is buttonImg (button image). At this time, you can completely replace the black flash browsing button that comes with the plug-in with an image, as long as your own image is in Chinese , doesn’t this solve the Chinese button problem? If you only add this one, you will find that there is a white area under your button image, which is actually left by the flash. The white area represents the available range of the mouse. This range can be adjusted with width and height. There is also a parameter wmode. Its default value is opaque. Just change it to transparent, which means to make the white area transparent. Use the method just mentioned again and set the key click range to be as large as your picture and it will be completely OK.
I won’t go into the usage of Uploadify. There are many articles on the Internet. The usage is the same as other jquery plug-ins, which is just the placement path of several files.
Attached below is an introduction to some parameters of Uploadify. If you want to see all of them, go to its API file, which is usually included in the downloaded package.
uploader: The relative path of the uploadify.swf file. The swf file is a button with the text BROWSE. When clicked, an open file dialog box pops up. Default value: uploadify.swf.
script: Relative path to the spooler. Default value: uploadify.php
checkScript: The relative path of the background processing program used to determine whether the uploaded selected file exists on the server
fileDataName: Set a name, and the uploaded file is retrieved based on this name in the server processing program data. The default is Filedata
method: submission method Post or Get. The default is Post
scriptAccess: the access mode of the flash script file. If it is set to always for local testing, the default value is: sameDomain
folder: the directory where the uploaded file is stored. .
queueID: The ID of the file queue, which is consistent with the ID of the div that stores the file queue.
queueSizeLimit: When multiple files are allowed to be generated, set the number of selected files. Default value: 999.
multi: Multiple files can be uploaded when set to true.
auto: Set to true and upload directly after selecting the file. If set to false, you need to click the upload button to upload.
fileDesc: This attribute value must be set with the fileExt attribute to be effective. It is used to set the prompt text in the file selection dialog box. For example, if fileDesc is set to "Please select rar docpdf file", the effect of opening the file selection box is as follows:
fileExt: Set the type of file that can be selected, such as: '*.doc;*.pdf;*.rar'.
sizeLimit: The size limit of uploaded files.
simUploadLimit: The number of simultaneous uploads allowed. Default value: 1.
buttonText: Text of the browse button, default value: BROWSE.
buttonImg: The path to browse the image of the button.
hideButton: Set to true to hide the image of the browse button.
rollover: The values are true and false. When set to true, there will be a reversal effect when the mouse moves over the browse button.
width: Set the width of the browse button, default value: 110.
height: Set the height of the browse button, default value: 30.
wmode: Setting this item to transparent can make the flash background file of the browse button transparent, and the flash file will be placed at the top level of the page. Default value: opaque.
cancelImg: Close button icon on each file after selecting the file into the file queue
Uploadify also comes with many parameters, useful methods and callback functions, all in the API. Although it is in English, it is easy to understand, so I won’t go into it here.
The following is the code I used, you can refer to it:

Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

AI Hentai Generator
Generate AI Hentai for free.

Hot Article

Hot Tools

Notepad++7.3.1
Easy-to-use and free code editor

SublimeText3 Chinese version
Chinese version, very easy to use

Zend Studio 13.0.1
Powerful PHP integrated development environment

Dreamweaver CS6
Visual web development tools

SublimeText3 Mac version
God-level code editing software (SublimeText3)

Hot Topics



Detailed explanation of jQuery reference method: Quick start guide jQuery is a popular JavaScript library that is widely used in website development. It simplifies JavaScript programming and provides developers with rich functions and features. This article will introduce jQuery's reference method in detail and provide specific code examples to help readers get started quickly. Introducing jQuery First, we need to introduce the jQuery library into the HTML file. It can be introduced through a CDN link or downloaded

How to remove the height attribute of an element with jQuery? In front-end development, we often encounter the need to manipulate the height attributes of elements. Sometimes, we may need to dynamically change the height of an element, and sometimes we need to remove the height attribute of an element. This article will introduce how to use jQuery to remove the height attribute of an element and provide specific code examples. Before using jQuery to operate the height attribute, we first need to understand the height attribute in CSS. The height attribute is used to set the height of an element

How to use PUT request method in jQuery? In jQuery, the method of sending a PUT request is similar to sending other types of requests, but you need to pay attention to some details and parameter settings. PUT requests are typically used to update resources, such as updating data in a database or updating files on the server. The following is a specific code example using the PUT request method in jQuery. First, make sure you include the jQuery library file, then you can send a PUT request via: $.ajax({u

jQuery is a fast, small, feature-rich JavaScript library widely used in front-end development. Since its release in 2006, jQuery has become one of the tools of choice for many developers, but in practical applications, it also has some advantages and disadvantages. This article will deeply analyze the advantages and disadvantages of jQuery and illustrate it with specific code examples. Advantages: 1. Concise syntax jQuery's syntax design is concise and clear, which can greatly improve the readability and writing efficiency of the code. for example,

Title: jQuery Tips: Quickly modify the text of all a tags on the page In web development, we often need to modify and operate elements on the page. When using jQuery, sometimes you need to modify the text content of all a tags in the page at once, which can save time and energy. The following will introduce how to use jQuery to quickly modify the text of all a tags on the page, and give specific code examples. First, we need to introduce the jQuery library file and ensure that the following code is introduced into the page: <

Title: Use jQuery to modify the text content of all a tags. jQuery is a popular JavaScript library that is widely used to handle DOM operations. In web development, we often encounter the need to modify the text content of the link tag (a tag) on the page. This article will explain how to use jQuery to achieve this goal, and provide specific code examples. First, we need to introduce the jQuery library into the page. Add the following code in the HTML file:

How to tell if a jQuery element has a specific attribute? When using jQuery to operate DOM elements, you often encounter situations where you need to determine whether an element has a specific attribute. In this case, we can easily implement this function with the help of the methods provided by jQuery. The following will introduce two commonly used methods to determine whether a jQuery element has specific attributes, and attach specific code examples. Method 1: Use the attr() method and typeof operator // to determine whether the element has a specific attribute

jQuery is a popular JavaScript library that is widely used to handle DOM manipulation and event handling in web pages. In jQuery, the eq() method is used to select elements at a specified index position. The specific usage and application scenarios are as follows. In jQuery, the eq() method selects the element at a specified index position. Index positions start counting from 0, i.e. the index of the first element is 0, the index of the second element is 1, and so on. The syntax of the eq() method is as follows: $("s
