Jquery.fileupload -jquery-ui.js错误不支持button元素

时间:2014-12-21 07:18:46

标签: jquery asp.net

有人可以帮我这个吗? 当我运行blueimp JqueryUi上传代码时,我不断收到此错误 enter image description here

我得到了与blueImp相同的代码。但我被困在这一部分。 我继续得到上面的错误。

请在下面找到我使用的编码和脚本。

HTML CODE:

<form id="fileupload" action="FileUploadHandler.ashx" method="POST" enctype="multipart/form-data">
    <!-- Redirect browsers with JavaScript disabled to the origin page -->
    <noscript><input type="hidden" name="redirect" value="https://blueimp.github.io/jQuery-File-Upload/"></noscript>
    <!-- The fileupload-buttonbar contains buttons to add/delete files and start/cancel the upload -->
    <div class="fileupload-buttonbar">
        <div class="fileupload-buttons">
            <!-- The fileinput-button span is used to style the file input field as button -->
            <span class="fileinput-button">
                <span>Add files...</span>

                <input type="file" name="files[]" multiple="multiple"/>
            </span>
            <button type="submit" class="start">Start upload</button>
            <button type="reset" class="cancel">Cancel upload</button>
            <button type="button" class="delete">Delete</button>
            <input type="checkbox" class="toggle"/>
            <!-- The global file processing state -->
            <span class="fileupload-process"></span>
        </div>
        <!-- The global progress state -->
        <div class="fileupload-progress fade" style="display:none">
            <!-- The global progress bar -->
            <div class="progress" role="progressbar" aria-valuemin="0" aria-valuemax="100"></div>
            <!-- The extended global progress state -->
            <div class="progress-extended">&nbsp;</div>
        </div>
    </div>
    <!-- The table listing the files available for upload/download -->
    <table role="presentation"><tbody class="files"></tbody></table>
</form>
<br>

<!-- The template to display files available for upload -->
<script id="template-upload" type="text/x-tmpl">
{% for (var i=0, file; file=o.files[i]; i++) { %}
    <tr class="template-upload fade">
        <td>
            <span class="preview"></span>
        </td>
        <td>
            <p class="name">{%=file.name%}</p>
            <strong class="error"></strong>
        </td>
        <td>
            <p class="size">Processing...</p>
            <div class="progress"></div>
        </td>
        <td>
            {% if (!i && !o.options.autoUpload) { %}
                <button class="start" disabled>Start</button>
            {% } %}
            {% if (!i) { %}
                <button class="cancel">Cancel</button>
            {% } %}
        </td>
    </tr>
{% } %}
</script>
<!-- The template to display files available for download -->
<script id="template-download" type="text/x-tmpl">
{% for (var i=0, file; file=o.files[i]; i++) { %}
    <tr class="template-download fade">
        <td>
            <span class="preview">
                {% if (file.thumbnailUrl) { %}
                    <a href="{%=file.url%}" title="{%=file.name%}" download="{%=file.name%}" data-gallery><img src="{%=file.thumbnailUrl%}"></a>
                {% } %}
            </span>
        </td>
        <td>
            <p class="name">
                <a href="{%=file.url%}" title="{%=file.name%}" download="{%=file.name%}" {%=file.thumbnailUrl?'data-gallery':''%}>{%=file.name%}</a>
            </p>
            {% if (file.error) { %}
                <div><span class="error">Error</span> {%=file.error%}</div>
            {% } %}
        </td>
        <td>
            <span class="size">{%=o.formatFileSize(file.size)%}</span>
        </td>
        <td>
            <button class="delete" data-type="{%=file.deleteType%}" data-url="{%=file.deleteUrl%}"{% if (file.deleteWithCredentials) { %} data-xhr-fields='{"withCredentials":true}'{% } %}>Delete</button>
            <input type="checkbox" name="delete" value="1" class="toggle">
        </td>
    </tr>
{% } %}
</script>

JavaScript文件:

 <script src="Scripts/Jquery/jquery-2.1.1.js"></script>
    <script src="Scripts/jqueryui/jquery.ui.widget.js"></script>
<!-- The Templates plugin is included to render the upload/download listings -->
    <script src="Scripts/FileUpload/tmpl.debug.js"></script>
<!-- The Load Image plugin is included for the preview images and image resizing functionality -->
    <script src="Scripts/FileUpload/load-image.debug.js"></script>
<!-- The Canvas to Blob plugin is included for image resizing functionality -->
    <script src="Scripts/FileUpload/canvas-to-blob.debug.js"></script>
<!-- blueimp Gallery script -->

<!-- The Iframe Transport is required for browsers without support for XHR file uploads -->
    <script src="Scripts/FileUpload/jquery.iframe-transport.js"></script>
<!-- The basic File Upload plugin -->
<script src="Scripts/FileUpload/jquery.fileupload.js"></script>
<!-- The File Upload processing plugin -->
<script src="Scripts/FileUpload/jquery.fileupload-process.js"></script>
<!-- The File Upload image preview & resize plugin -->
<script src="Scripts/FileUpload/jquery.fileupload-image.js"></script>
<!-- The File Upload audio preview plugin -->
<script src="Scripts/FileUpload/jquery.fileupload-audio.js"></script>
<!-- The File Upload video preview plugin -->
<script src="Scripts/FileUpload/jquery.fileupload-video.js"></script>
<!-- The File Upload validation plugin -->
<script src="Scripts/FileUpload/jquery.fileupload-validate.js"></script>
<!-- The File Upload user interface plugin -->
<script src="Scripts/FileUpload/jquery.fileupload-ui.js"></script>
<!-- The File Upload jQuery UI plugin -->
    <script src="Scripts/FileUpload/jquery.fileupload-jui.js"></script>    
<!-- The main application script -->
    <script src="Scripts/FileUpload/main.js"></script>
<script>
    // Initialize the jQuery UI theme switcher:
    $('#theme-switcher').change(function () {
        var theme = $('#theme');
        theme.prop(
            'href',
            theme.prop('href').replace(
                /[\w\-]+\/jquery-ui.css/,
                $(this).val() + '/jquery-ui.css'
            )
        );
    });
</script>
   <script src="Scripts/cors/jquery.xdr-transport.js"></script>

0 个答案:

没有答案