Giter Club home page Giter Club logo

xloader's Introduction

XLoader

简单的jQuery多图片上传插件

浏览器支持:Chrome,Safari,Firefox

使用方式

1.引入jQuery与XLoader.js

2.创建表单:

<form action="upload.php" method="post" enctype="multipart/form-data">
  <input id="file" type="file" name="images[]" accept="image/*" multiple>
  <button type="submit">Upload</button>
</form>

3.激活多图片上传功能:

<script type="text/javascript">
$('#file').XLoader({
	target : 'target.php' // 多图片上传目标脚本(必须)
});
</script>

参数说明

当激活XLoader时,需要传递一个数组对象,以配置参数,参数列表如下:

  • target : 多图片上传目标脚本(必须),图片上传通过此脚本进行
  • container : 图片列表容器,默认在图片选择按钮下面展示
  • registerStyle : 是否注册自带样式,默认注册
  • tableOptions : 表格属性设置,默认:{id : 'XLoaderTable'}
  • columnOptions : 表格列设置,您可以指定哪些列显示,目前支持5列:number, image, name, size, textarea
  • imageOptions : 图片属性设置,默认:{}
  • textareaOptions : 输入框设置,默认:{name : 'descriptions[]'}
  • hiddenFieldName : 图片文件名隐藏域的名称,默认:'imageNames[]'
  • resourcesUrl : 资源请求url,如果需要载入已有图片,请设置该参数,默认:''

xloader's People

Contributors

daixianceng avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.