简单的HTML表问题 [英] Simple HTML table issue
问题描述
我编码在PHP和我的代码为简单的HTML表。在该表中,列是可编辑的,并且有输入 type = number
用于限制列名称中的负值输入:纸箱,宽度,深度,高度和动作列。 / p>
但它不工作,创建输入 type =number
和 min = 0
$ b
这是链接: http://sea.studioscue.in/test.php
只需检查 validity.valid
属性即可。当且仅当输入落在范围内时,这才是真的。
只需将 oninput =validity.valid ||(value ='');
添加到您的输入字段。
< input type =numberoninput =validity.valid ||(value =''); class =cartonmin =0value =name =cartonmaxlength =5style =width:100px>
I'm coding in PHP and I code for simple HTML table. In that table the columns are editable and there is input type=number
used to restrict from negative value entry in column names: Carton, Width, Depth, Height and Act columns.
But it's not working, creating problem with input type="number"
and min="0"
inside the html table.
Here is the link: http://sea.studioscue.in/test.php
just check the validity.valid
property. This will be true if and only if the input falls within the range.
just add oninput="validity.valid||(value='');"
to your input field.
<input type="number" oninput="validity.valid||(value='');" class="carton" min="0" value="" name="carton" maxlength="5" style="width:100px">
这篇关于简单的HTML表问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!