Chạy Thử Thẻ select dạng optgroup
Trình soạn thảo - Chạy Thử Thẻ select dạng optgroup
Kết quả - Chạy Thử Thẻ select dạng optgroup
Tự code rồi chạy thử...
Chạy Thử
<!DOCTYPE html>
<html>
<head>
<title>Chạy Thử Thẻ select dạng optgroup</title>
</head>
<body>
<h1>Chạy Thử Thẻ select dạng optgroup</h1>
<p>Chia theo danh mục riêng, mỗi danh mục có nhãn riêng để dễ nhận biết:</p>
<form method="POST" action="">
<label for="tinhthanh">Chọn tỉnh thành:</label>
<select id="tinhthanh" name="chontinhthanh">
<optgroup label="MIỀN BẮC">
<option value="hn">Hà Nội</option>
<option value="nd">Hà Nam</option>
</optgroup>
<optgroup label="MIỀN NAM">
<option value="hcm">TP. Hồ Chí Minh</option>
<option value="bd">Long An</option>
</optgroup>
<optgroup label="MIỀN TRUNG">
<option>Quảng Nam</option>
<option>Đà Nẳng</option>
</optgroup>
</select>
<input type="submit" name="gui" value="GỬI">
</form>
</body>
</html>
<!DOCTYPE html>
<html>
<head>
<title>Chạy Thử Thẻ select dạng optgroup</title>
</head>
<body>
<h1>Chạy Thử Thẻ select dạng optgroup</h1>
<p>Chia theo danh mục riêng, mỗi danh mục có nhãn riêng để dễ nhận biết:</p>
<form method="POST" action="">
<label for="tinhthanh">Chọn tỉnh thành:</label>
<select id="tinhthanh" name="chontinhthanh">
<optgroup label="MIỀN BẮC">
<option value="hn">Hà Nội</option>
<option value="nd">Hà Nam</option>
</optgroup>
<optgroup label="MIỀN NAM">
<option value="hcm">TP. Hồ Chí Minh</option>
<option value="bd">Long An</option>
</optgroup>
<optgroup label="MIỀN TRUNG">
<option>Quảng Nam</option>
<option>Đà Nẳng</option>
</optgroup>
</select>
<input type="submit" name="gui" value="GỬI">
</form>
</body>
</html>
- Chạy Thử Thẻ select dạng optgroup nằm trong bài viết Thẻ SELECT trong HTML
- ★★★★★ ★★★★★