亚洲区国产区激情区无码区,国产成人mv视频在线观看,国产A毛片AAAAAA,亚洲精品国产首次亮相在线

HTML 參考手冊(cè)

HTML 標(biāo)簽大全

HTML: <input> step 屬性

input step屬性指定 <input>元素中合法編號(hào)之間的間隔,如果step =“ 3”,則合法數(shù)字可以是-3、0、3、6等,同時(shí)step 屬性可以與 max 和 min 屬性配合使用,以創(chuàng)建合法值的范圍。

 HTML <input> 標(biāo)簽

在線示例

一個(gè)HTML表單,其中的輸入字段具有指定的合法數(shù)字間隔:

<!DOCTYPE html>
<html>
<head>
<title>HTML:<input> step 屬性 - 菜鳥教程(cainiaoplus.com)</title>
<body>
<form action="action_page.php">
  <input type="number" name="points" step="3">
  <input type="submit">
</form>
</html>
測(cè)試看看 ?/?

瀏覽器兼容性

IEFirefoxOperaChromeSafari

Internet Explorer 10、Opera、Chrome 和 Safari 支持 step 屬性。

注意:Firefox 或者 Internet Explorer 9 及之前的版本不支持 <input> 標(biāo)簽的 step 屬性。

定義和用法

step屬性指定<input>元素中合法編號(hào)之間的間隔。

例如:如果step =“ 3”,則合法數(shù)字可以是-3、0、3、6等。

提示:step 屬性可以與 maxmin 屬性配合使用,以創(chuàng)建合法值的范圍。

注意:step 屬性適用于下面的 input 類型:number、range、date、datetime、datetime-local、month、time 和 week。

HTML 4.01 與 HTML5之間的差異

step 屬性是 HTML5 中的新增屬性。

語(yǔ)法

<input step="number">

屬性值

描述
number規(guī)定輸入字段的合法數(shù)字間隔。
 HTML <input> 標(biāo)簽