```
<input id="c-week1" class="form-control num-input" name="row[week1]" type="number" value="{$row.week1|htmlentities}">
```
限制最小值
```
<input id="c-week1" class="form-control num-input" name="row[week1]" type="number" min='1' value="{$row.week1|htmlentities}">
<script src="https://www.jq22.com/jquery/jquery-3.3.1.js"></script>
<script>
//输入框只能输入数字 0 正整数
$(document).on('input', '.num-input', function () {
let val = $(this).val();
//只能输入数字
if(val<=0){
val = val.slice(0, 1);
}
$(this).val(val);
});
</script>
```