新增input中type類型許多非常好用,可以都去嘗試一下!下面稍微介紹幾個:
時間類型的一般帶有 calendar(日曆的意思) 和 time 控件
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>color拾取器</title>
</head>
<body>
<input type="datetime-local">
</body>
</html>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>color拾取器</title>
</head>
<body>
<input type="number">
</body>
</html>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>color拾取器</title>
</head>
<body>
<input type="time">
</body>
</html>