/KitJs/src/labs/Upload/demo.htm

https://github.com/wuxq/KitJs · HTML · 38 lines · 33 code · 4 blank · 1 comment · 0 complexity · 6e0fb47850e55bca2871e34cececa5dd MD5 · raw file

  1. <!DOCTYPE html>
  2. <html>
  3. <head>
  4. <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
  5. <link href="fileuploader.css" rel="stylesheet" type="text/css">
  6. <style>
  7. body {font-size:13px; font-family:arial, sans-serif; width:700px; margin:100px auto;}
  8. </style>
  9. </head>
  10. <body>
  11. <p><a href="http://github.com/valums/file-uploader">Back to project page</a></p>
  12. <p>To upload a file, click on the button below. Drag-and-drop is supported in FF, Chrome.</p>
  13. <p>Progress-bar is supported in FF3.6+, Chrome6+, Safari4+</p>
  14. <div id="file-uploader-demo1">
  15. <noscript>
  16. <p>Please enable JavaScript to use file uploader.</p>
  17. <!-- or put a simple form for upload here -->
  18. </noscript>
  19. </div>
  20. <script src="fileuploader.js" type="text/javascript"></script>
  21. <script>
  22. function createUploader(){
  23. var uploader = new qq.FileUploader({
  24. element: document.getElementById('file-uploader-demo1'),
  25. action: 'do-nothing.htm',
  26. debug: true
  27. });
  28. }
  29. // in your app create uploader as soon as the DOM is ready
  30. // don't wait for the window to load
  31. window.onload = createUploader;
  32. </script>
  33. </body>
  34. </html>