Adding labels and error messages

This commit is contained in:
Adrian Gaudebert 2011-05-13 16:28:11 -07:00
Родитель 1aaac6d18a
Коммит 00bb7d5e4f
2 изменённых файлов: 17 добавлений и 6 удалений

Просмотреть файл

@ -27,9 +27,17 @@
-->
<div>
<input type="text" name="user_name" value="Username">
<input type="password" name="user_pwd" value="Password">
<button type="submit" class="button">OK</button>
<form method="post" action="">
<label>
<input type="text" name="user_name" placeholder="Username" value="John">
<span class="error">This field is required.</span>
</label>
<label>
<input type="password" name="user_pwd" placeholder="Password">
<span class="error">This field is required.</span>
</label>
<button type="submit" class="button">OK</button>
</form>
</div>
<ul>

Просмотреть файл

@ -27,9 +27,12 @@
-->
<div>
<form method="post" action="">
<input type="text" name="user_name" placeholder="Username">
<input type="password" name="user_pwd" placeholder="Password">
<label>
<input type="text" name="user_name" placeholder="Username">
</label>
<label>
<input type="password" name="user_pwd" placeholder="Password">
</label>
<button type="submit" class="button">OK</button>
</form>
</div>