Plupload在尝试启动时抛出错误

时间:2016-04-01 09:34:36

标签: javascript plupload

使用plupload v2会收到错误:

Uncaught TypeError: Failed to execute 'getComputedStyle' on 'Window': parameter 1 is not of type 'Element'.

代码示例:

<script type="text/javascript">
    $(document).ready(function() {
        var uploader = new plupload.Uploader({
            browse_button: $('#chunked_file'),
            url: 'uploader.php'
        });

        uploader.init();
    );
</script>

1 个答案:

答案 0 :(得分:0)

选择browse_button DOM元素时使用纯JavaScript可解决问题或只选择browse_button: 'chunked_file'

似乎plupload不支持jQuery作为选择器。

相关问题