JSFiddle - React, Tailwind, and code Playground
HTML
<div data-role="page" data-theme="a">
<div data-role="content">
<form id='inputform' method="post" action="/Detail/SaveFullDocument?_entity=DokG&_id=0">
<fieldset>
<div class='form-field'>
<label class='form-label' for='Tasudok'>Order number</label>
<input class='ui-widget-content ui-corner-all form-fullwidth' data-index="1" id='Tasudok' name='Tasudok' value='' maxlength='25' />
</div>
<input type="hidden" name="_rows" />
<table id="tableId">
<tr>
<th>Product code</th>
<th>Quantity</th>
<td>
<input type="button" value="+" onclick="addRow('tableId')" />
</td>
</tr>
<tr>
<td>
<input type="text" name="Toode" data-index="2" />
</td>
<td>
<input type="number" name="Kogus" data-index="3" />
</td>
<td>
<input type="button" value="-" onclick="deleteRow(this)" />
</td>
</tr>
</table>
<input type="button" value="+" onclick="addRow('tableId')" />
<input type="submit" value='Save order' />
</fieldset>
</form>
</div>
</div>
JavaScript
$('#inputform').on('keydown', 'input', function (event) {
if (event.which == 13) {
event.preventDefault();
var $this = $(event.target);
var index = parseFloat($this.attr('data-index'));
$('[data-index="' + (index + 1).toString() + '"]').focus();
}
});