|
@@ -0,0 +1,63 @@
|
|
|
+<!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" id="inp1" value="hello" name="username" placeholder="请输入用户名" autofocus>
|
|
|
+ <input type="password">
|
|
|
+ <input type="date" name="dateinp">
|
|
|
+ <input type="color" name="colorinp">
|
|
|
+ <input type="range" name="rangeinp" max="100" min="0" step="10">
|
|
|
+
|
|
|
+ <input type="checkbox" name="checkboxinp">篮球
|
|
|
+ <input type="checkbox" name="checkboxinp">足球
|
|
|
+ <input type="checkbox" name="checkboxinp">乒乓球
|
|
|
+
|
|
|
+ <input type="radio" name="radioinp">男
|
|
|
+ <input type="radio" name="radioinp">女
|
|
|
+
|
|
|
+ <select name="selectinp">
|
|
|
+ <option value="1">1</option>
|
|
|
+ <option value="2">2</option>
|
|
|
+ <option value="3">3</option>
|
|
|
+ </select>
|
|
|
+
|
|
|
+ <textarea name="textareainp" cols="30" rows="10"></textarea>
|
|
|
+
|
|
|
+ <input type="file" name="fileinp">
|
|
|
+
|
|
|
+ <input type="email" name="emailinp">
|
|
|
+ <input type="url" name="urlinp">
|
|
|
+
|
|
|
+ <input list="listinp">
|
|
|
+ <datalist id="listinp">
|
|
|
+ <option value="1"></option>
|
|
|
+ <option value="2"></option>
|
|
|
+ <option value="3"></option>
|
|
|
+ </datalist>
|
|
|
+
|
|
|
+ <input type="button" onclick="getVal()" value="input按钮">
|
|
|
+ <button type="submit">button按钮</button>
|
|
|
+ </form>
|
|
|
+
|
|
|
+ <form oninput="x.value = parseInt(a.value) + parseInt(b.value)">
|
|
|
+ <input type="number" value="1" step="10" id="a">
|
|
|
+ <input type="number" value="1" id="b">
|
|
|
+ <output name="x" for="a b"></output>
|
|
|
+ </form>
|
|
|
+
|
|
|
+ <script>
|
|
|
+ function getVal() {
|
|
|
+ var inp1 = document.getElementById("inp1");
|
|
|
+ console.log(inp1.value);
|
|
|
+ }
|
|
|
+ </script>
|
|
|
+</body>
|
|
|
+
|
|
|
+</html>
|