<!DOCTYPE html>访问 OPTGROUP 元素size="4"id="myOptgroup" label="Swedish Cars"value="volvo"Volvovalue="saab"Saabvalue="koenigsegg"Koenigsegg点击按钮获取选项组的标签/描述。id="demo"onclick="myFunction()"尝试一下function myFunction(){var x = document.getElementById("myOptgroup").label;document.getElementById("demo").innerHTML = x;}