|
@@ -0,0 +1,39 @@
|
|
|
|
|
+<!DOCTYPE html>
|
|
|
|
|
+<html lang="en">
|
|
|
|
|
+
|
|
|
|
|
+<head>
|
|
|
|
|
+ <meta charset="UTF-8">
|
|
|
|
|
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
|
|
|
+ <title>Document</title>
|
|
|
|
|
+</head>
|
|
|
|
|
+
|
|
|
|
|
+<body>
|
|
|
|
|
+ <form action="xxx.php">
|
|
|
|
|
+ <input type="text">
|
|
|
|
|
+ <!-- 数字文本框 -->
|
|
|
|
|
+ <input type="number" max="10" min="1" step="2">
|
|
|
|
|
+ <input class="color-inp" type="color">
|
|
|
|
|
+ <input type="date">
|
|
|
|
|
+ <!-- <input type="datetime"> -->
|
|
|
|
|
+ <input id="range-inp" type="range">
|
|
|
|
|
+ <!-- <input name="phone" type="tel"> -->
|
|
|
|
|
+ <input type="url">
|
|
|
|
|
+ <input type="email">
|
|
|
|
|
+
|
|
|
|
|
+ <button id="btn" type="">按钮</button>
|
|
|
|
|
+ </form>
|
|
|
|
|
+
|
|
|
|
|
+ <script>
|
|
|
|
|
+ var oId = document.getElementById("btn");
|
|
|
|
|
+ var oColor = document.getElementsByClassName("color-inp")[0];
|
|
|
|
|
+ var rangeInp = document.getElementById("range-inp");
|
|
|
|
|
+
|
|
|
|
|
+ oId.onclick = function () {
|
|
|
|
|
+ // console.log(oColor.value)
|
|
|
|
|
+ console.log(rangeInp.value);
|
|
|
|
|
+
|
|
|
|
|
+ }
|
|
|
|
|
+ </script>
|
|
|
|
|
+</body>
|
|
|
|
|
+
|
|
|
|
|
+</html>
|