<html>
<body>
<SELECT>
<OPTGROUP LABEL="碱性金属">
<OPTION>锂 (Li)</OPTION>
<OPTION>纳 (Na)</OPTION>
<OPTION>钾 (K)</OPTION>
</OPTGROUP>
<OPTGROUP LABEL="卤素">
<OPTION>氟 (F)</OPTION>
<OPTION>氯 (Cl)</OPTION>
<OPTION>溴 (Br)</OPTION>
</OPTGROUP>
</SELECT>
</body>
</html>
---------------------------------------------------
<html:select name="jCDataDefineMenuForm" property="selectItem" style="width:200x" οnchange="doSearch();">
<option value="-1">请选择</option>
<% for(int i=0; i<theSize;i++)
{
%>
<optgroup label="<%=typeName.get(i)%>">
<% ArrayList tempNameList=(ArrayList)modeName.get(i);
ArrayList tempNoList=(ArrayList)modeNo.get(i);
int tempModeSize=tempNameList.size();
for(int j=0; j<tempModeSize; j++)
{
%>
<option value="<%=typeNo.get(i)%>,<%=tempNoList.get(j)%>" ><%=typeName.get(i)%><%=tempNameList.get(j)%></option>
<%}%>
</optgroup>
<%}%>
</html:select>