ブラウザ別DOM実装差異 〜new Option, innerText〜
環境
- Windows XP 32bit
- Mozilla Firefox 16.0.1
- Opera 12.02 (1578)
- SRWare Iron 22.0.1250.0 (160000)
- Microsoft Internet Explorer 8.0.6001.18702
予備知識
JS 式 | 実体 |
---|---|
new Option("text","value") | HTML 要素 <option value="value">text</option> |
Option("text","value") | |
document.body.innerText | "some 文字列" |
document.body.textContent |
実装状況
new Option | Option() | innerText | textContent | |
---|---|---|---|---|
Firefox 16 | OK | OK | NG | OK |
Opera 12 | OK | OK | OK | OK |
Iron 22 | OK | NG | OK | OK |
IE 8 | OK | NG | OK | NG |