Wed, 31 Dec 2014 07:16:47 +0100
Revert simplistic fix pending revisit of Mozilla integration attempt.
michael@0 | 1 | <!DOCTYPE html> |
michael@0 | 2 | <body> |
michael@0 | 3 | <html> |
michael@0 | 4 | <select id="test" size="8"> |
michael@0 | 5 | </select> |
michael@0 | 6 | <script> |
michael@0 | 7 | var optgroup = document.createElement("optgroup"); |
michael@0 | 8 | optgroup.setAttribute('label', 'An optgroup'); |
michael@0 | 9 | var option = document.createElement("option"); |
michael@0 | 10 | var optionText = document.createTextNode("An option"); |
michael@0 | 11 | option.appendChild(optionText); |
michael@0 | 12 | var select = document.getElementById("test"); |
michael@0 | 13 | |
michael@0 | 14 | optgroup.appendChild(option); |
michael@0 | 15 | select.appendChild(optgroup); |
michael@0 | 16 | </script> |
michael@0 | 17 | </body> |
michael@0 | 18 | </html> |