今天一个操作是先要ajax返回列表中的json数据,然后绑定到一个table列表中,table首列是一个checkbox控制器,可以多选多个数据对象,然后返回结果
html代码:
<div class="container">
<div class="row cl">
<div class="col-sm-12">
<table class="table table-bg table-border table-bordered">
<thead>
<tr>
<th></th>
<th>字段名</th>
<th>数据类型</th>
<th>注释</th>
</tr>
</thead>
<tbody data-bind="foreach: list">
<tr>
<td> <input type="checkbox" data-bind="checkedValue:$data, checked: $parent.chosenData" /> </td>
<td data-bind="text:field"></td>
<td data-bind="text:type"></td>
<td data-bind="text:comment"></td