<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml" dir="ltr">
<head>
<meta http-equiv="content-type" content="text/html; charset=UTF-8"/>
<title>Plupload - Custom example</title>
<!-- production -->
<script type="text/javascript" src="../js/plupload.full.min.js"></script>
<!-- debug
<script type="text/javascript" src="../js/moxie.js"></script>
<script type="text/javascript" src="../js/plupload.dev.js"></script>
-->
</head>
<body style="font: 13px Verdana; background: #eee; color: #333">
<div id="uploader">
<p>Your browser doesn't have Flash, Silverlight or HTML5 support.</p>
</div>
<script type="text/javascript">
// Initialize the widget when the DOM is ready
$(function() {
// Setup html5 version
$("#uploader").pluploadQueue({
// General settings
runtimes : 'html5,flash,silverlight,html4',
url : "/examples/upload",
chunk_size : '1mb',
rename : true,
dragdrop: true,
filters : {
// Maximum file size
max_file_size : '10mb',
// Specify what files to browse for
mime_types: [
{title : "Image files", extensions : "jpg,gif,png"},
{title : "Zip files", extensions : "zip"}
]
},
// Resize images on clientside if we can
resize: {
width : 200,
height : 200,
quality : 90,
crop: true // crop to exact dimensions
},
// Flash settings
flash_swf_url : '/plupload/js/Moxie.swf',
// Silverlight settings
silverlight_xap_url : '/plupload/js/Moxie.xap'
});
});
</script>
</body>
</html>
&#13;
嘿伙计们我一直在收到错误
您的浏览器没有Flash,Silverlight或HTML5支持。
我正在使用的代码就在那里,我不知道如何修复我在这个Plupload上尝试了所有的运行时。 我已经尝试了很多天来解决这个问题,但没有找到任何帮助。
答案 0 :(得分:1)
看起来你需要加载jQuery(并且基于plupload的文档,你还需要jQuery UI)
答案 1 :(得分:0)
我将代码放在下面,它对我有用:
<script>
jQuery.fn.extend({
live: function (event, callback) {
if (this.selector) {
jQuery(document).on(event, this.selector, callback);
}
return this;
}
});
</script>