Source code

Revision control

Copy as Markdown

Other Tools

Test Info:

<head>
<script>
function foopy()
{
var optgroup = document.getElementById("optgroup");
var newspan = document.createElementNS("http://www.w3.org/1999/xhtml", "span");
optgroup.insertBefore(newspan, optgroup.firstChild);
}
</script>
</head>
<body onload="foopy()">
<select><optgroup label="optgroup" id="optgroup"><option>option</option></optgroup></select>
</body>
</html>