Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/tensorflow/5.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Html 最小值和最大值不';我无法使用文本输入_Html_Html Input - Fatal编程技术网

Html 最小值和最大值不';我无法使用文本输入

Html 最小值和最大值不';我无法使用文本输入,html,html-input,Html,Html Input,我得到了这个HTML: 全名 消息 你是说minlength? 使用文本时,您可能希望使用minlength和maxlength强制文本的长度 <form action="/action_page.php"> <label for="password">Password:</label> <input type="password" id="password" n

我得到了这个HTML:


全名
消息

你是说
minlength
? 使用文本时,您可能希望使用
minlength
maxlength
强制文本的长度

<form action="/action_page.php">
  <label for="password">Password:</label>
  <input type="password" id="password" name="password" minlength="8"><br><br>
  <input type="submit" value="Submit">
</form>

密码:


(来自学校)

请参见此示例:

您可以使用
minlength=“1”maxlength=“15”
设置可输入文本字段的字符数

只能为
s指定列和行。在这里,您可以使用
rows=“5”cols=“50”
指定文本区域的大小

请参见下面的代码段:


全名
消息

1) 2)没有idea@sinisake那么我们在哪里使用属性min和max呢Pinput type=“number”我想说…一个旁注-不要只依赖客户端输入验证。。。但是,如果您确实需要具有特定最小和最大长度的文本,也要进行服务器端验证……一个可能的任务解决方案可以通过一个小javascript实现。如果可行的话-