超棒的純Javascript實現的文件上傳功能 – Fine uploader

IE7+
Firefox
Safari (OS X)
Chrome
不使用jQuery,flash也不依賴任何第三方類庫。我們隻需要導入CSS和js文件即可,是不是非常方便
<!DOCTYPE html>
<html>
  <head>
    <meta charset="utf-8">
    <title>Fine Uploader Demo</title>
    <link href="client/fileuploader.css" rel="stylesheet">
  </head>
  <body>
    <p id="fine-uploader"></p>
    <script src="client/fileuploader.js"></script>
    <script>
      function createUploader() {
        var uploader = new qq.FileUploader({
          element: document.getElementById('fine-uploader'),
          // Use the relevant server script url here
          action: 'yourServerScript'
        });
      }
   
      window.onload = createUploader;
    </script>
    </body>
</html>
同時可以整合很多流行的後臺語言:
ASP.NET
ColdFusion
Java Node.js
Perl
PHP
Python
 

發佈留言