效果图:
html:
<script type="text/javascript" src="../main/js/paging.js"></script>
<a class="glyphicon glyphicon-plus-sign" onclick="addrow()">添加一行</a>
<a class="glyphicon glyphicon-plus-sign" onclick="addmore()">添加多行</a>
<table class="table table-bordered" id="tablestru">
<tr>
<td>列名</td>
<td>类型</td>
<td></td>
</tr>
</table>
<div id="nextSave-page" class="pagecss"></div>
newMain.js:
function addrow(){
var tables = $('#tablestru');
var addtr = $("<tr>"
+'<td style="text-align:center;width:50%"><input style="width:96%" name="columnName" maxlength="25" onblur="addonerow()"></input></td>'
+'<td style="text-align:center;width:30%">'
+'<select style="width:96%" name="kindName" id="kindNameSelect">'
+'<option value="bigint">bigint</option>'
+'<option value="double">double</option>'
+'<option value="decimal">decimal</option>'
+'<option value="varchar">varchar</option>'
+'<option value="boolean">boolean</option>'
+'<option value="datetime">datetime</option>'
+' </select>'
+'