HTML教程,认识optgroup元素_XHTML教程

编辑Tag赚U币
教程Tag:暂无Tag,欢迎添加,赚取U币!

select的分类选择,经测试IE和FF都能很好的支持该元素

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>runcode</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="Author" content="Sheneyan" />
</head>
<body>
<select>
<optgroup label="a">
<option>a1</option>
<option>a2</option>
<option>a3</option>
</optgroup>
<optgroup label="b">
<option>b1</option>
<option>b2</option>
<option>b3</option>
</optgroup>
</select>
</body>
</html>

来源:模板无忧//所属分类:XHTML教程/更新时间:2007-12-13
相关XHTML教程