Here is my code
<form class="form-horizontal">
<div class="control-group">
<div class="controls">
<button onclick="javascript:add_user_group(2);" class="btn">add</button>
</div>
</div>
<table id="users-table" class="table table-striped" >
<thead>
<tr>
<th>User Name</th>
<th>Delete</th>
</tr>
</thead>
<tbody>
</tbody>
</table>
</form>
I just want to add a new row to a table when a add button clicked, but it seems a click of the add button triggers a submission of form.
Isn't is only a button with
type=submit
to submit form. Or any button in a form triggers a submission of form ?