Input File Upload specifies a specific file type

Source: Internet
Author: User

In useIf you want to specify a specific file type for this html element, you can write

 

. The types after the characters can be specified at will. If you want to specify multiple types, you can use commas to separate them,

 

When using the fine uploader Upload Component, if you need to limit the File Upload type, the method is
Var manualuploader = new qq. fineUploader ({element: $ ("# manual-fine-uploader") [0], request: {endpoint: url}, validation: {allowedExtensions: ['dwg '], acceptFiles :'. dwg '}, callbacks: {onAllComplete: function () {// call after all files are uploaded successfully}, template: "qq-template-manual-noedit", autoUpload: false });

Others can be ignored. You only need to check the content in validation. In this way, you can limit the file type. Even if you select a file of another format, the system will prompt you that the file format is incorrect, because allowedExtensions limits the file format.

However, ie6 and ie7 are not supported. Currently, there are many users using 360 browsers in China. You can specify the 360 speed mode in the code so that when users open a webpage, they will browse in the speed mode by default, ie6 and ie7 will not appear

. The setting method is as follows:

Add a line of code to the head label

      
       

The value of content is webkit, ie-comp, or ie-stand, which is case sensitive. It indicates that the webkit kernel is used, the IE is compatible with the kernel, and the IE standard kernel is used.
If the page needs to use a speed core by default, add the tag:
If you need to use ie compatible kernel by default on the page, add the following labels:
If the page needs to use the ie standard kernel by default, add the following labels:




Related Article

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.