<div class="wrap">
    <h2>批量上传</h2>
    <form enctype="multipart/form-data" method="post" class="form-inline">
        <input type="file" name="file" id="file" accept="application/x-zip-compressed" style="display: none;">
        <a class="file-input-wrapper btn btn-default" onclick="$('#file').click();" style="margin: 10px 0;">
            <span id="name">选择zip压缩文件</span>
        </a>
        <br>
        <input type="submit" class="button action" value="提交">
    </form>
</div>
<script>
    $(document).ready(function () {
        $('#file').bind('change', function () {
            var size = this.files[0].size / 1024 / 1024;
            if (size > 100) {
                $(this).val('');
                alert('上传zip压缩文件 大小不能超出100MB');
            } else {
                var label = $(this).val().replace(/\\/g, '/').replace(/.*\//, '');
                $('#name').text(label);
            }
        });
    });
</script>