简体   繁体   English

Fine-uploader开箱即用的问题/错误

[英]Fine-uploader out of the box questions / errors

Attempting to run fineuploader right out of the box using the same code that's on the site. 尝试使用站点上的相同代码立即开箱即用地运行fineuploader。

<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Fine Uploader Demo</title>
<link href="custom.fineuploader-4.0.3.css" rel="stylesheet">
</head>
<body>
<div id="fine-uploader"></div>
<script src="custom.fineuploader-4.0.3.js"></script>
<script>
  function createUploader() {
    var uploader = new qq.FineUploader({
      element: document.getElementById('fine-uploader'),
      request: {
        endpoint: 'server/handleUploads'
      }
    });
  }
  window.onload = createUploader;
</script>
</body>
</html>

Even before beginning to mess around with the endpoint.php I took a look at in a browser and I'm getting the following errors in Firebug: 甚至在开始弄乱endpoint.php之前,我都在浏览器中进行了查看,并且在Firebug中遇到了以下错误:

ReferenceError: jQuery is not defined
}(jQuery));
custom....0.3.js (line 8012)
Error: Cannot find template script at ID 'qq-template'!
...ew Error(qq.format("Cannot find template script at ID '{}'!", options.templateId...

What am I missing? 我想念什么?

jQuery library is missing in your code add this in your head tag 您的代码中缺少jQuery库,请在您的head标签中添加它

<head>
.
.
.    
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js">
.
.
</script>
</head>

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM