首先,form表单需要具有如下代码

<form class="form-horizontal" role="form" method="POST" action="">
    <input id="c-image" class="form-control" size="50" name="row[image]" type="text" value="">
    <span>
        <button type="button" id="plupload-image" class="btn btn-danger plupload" data-input-id="c-image"
                  data-mimetype="image/*" data-multiple="false" data-preview-id="p-image">
            <i class="fa fa-upload"></i> 上传
        </button>
    </span>

    <ul class="row list-inline plupload-preview" id="p-image"></ul>

</form>

js文件需要

define(['jquery', 'bootstrap', 'backend', 'table', 'form'], function ($, undefined, Backend, Table, Form) {

    var Controller = {
        index: function () {

        }
    };
    Form.api.bindevent($("form[role=form]"));
    return Controller;
});

 

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2021-05-11
  • 2021-12-18
  • 2022-01-08
  • 2022-01-23
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2021-07-20
  • 2022-12-23
  • 2022-12-23
  • 2021-10-06
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案