Skip to content

Instantly share code, notes, and snippets.

@patorash
Created March 21, 2013 15:11
Show Gist options
  • Save patorash/5213787 to your computer and use it in GitHub Desktop.
Save patorash/5213787 to your computer and use it in GitHub Desktop.
html5のフォームのinputタグをいろいろと試してみた。
<!DOCTYPE html>
<html>
<head>
<meta content="text/html" charset="utf-8">
<title>サンプル</title>
<style type="text/css">
</style>
</head>
<body>
<form>
<table>
<tr>
<th>
<label for="search">search</label>
</th>
<td>
<input type="search" name="search" id="search">
</td>
</tr>
<tr>
<th>
<label for="date">date</label>
</th>
<td>
<input type="date" name="date" id="date" required>
</td>
</tr>
<tr>
<th>
<label for="time">time</label>
</th>
<td>
<input type="time" name="time" id="time" required>
</td>
</tr>
<tr>
<th>
<label for="month">month</label>
</th>
<td>
<input type="month" name="month" id="month" required>
</td>
</tr>
<tr>
<th>
<label for="week">week</label>
</th>
<td>
<input type="week" name="week" id="week" required>
</td>
</tr>
<tr>
<th>
<label for="datetime">datetime</label>
</th>
<td>
<input type="datetime" name="datetime" id="datetime" required>
</td>
</tr>
<tr>
<th>
<label for="color">color</label>
</th>
<td>
<input type="color" name="color" id="color" oninput="color_output.value=value" required>
<output name="color_output" id="color_output" ></output>
</td>
</tr>
<tr>
<th>
<label for="email">email</label>
</th>
<td>
<input type="email" name="email" id="email" required>
</td>
</tr>
<tr>
<th>
<label for="range">range</label>
</th>
<td>
<input type="range" name="range" id="range" oninput="range_output.value=value" required>
<output name="range_output" id="range_output"></output>
</td>
</tr>
<tr>
<th>
<label for="number">number</label>
</th>
<td>
<input type="number" name="number" id="number" required>
</td>
</tr>
<tr>
<th>
<label for="tel">tel</label>
</th>
<td>
<input type="tel" name="tel" id="tel" required>
</td>
</tr>
<tr>
<th>
<label for="url">url</label>
</th>
<td>
<input type="url" name="url" id="url" required>
</td>
</tr>
<tr>
<th></th>
<td>
<input type="submit" value="登録">
</td>
</tr>
</table>
</form>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment