1 |
wakaba |
1.1 |
<!DOCTYPE HTML> |
2 |
|
|
|
3 |
|
|
<p id=result class=FAIL>FAIL (noscript)</p> |
4 |
|
|
|
5 |
|
|
<script> |
6 |
|
|
var result = document.getElementById ('result'); |
7 |
|
|
result.firstChild.data = 'FAIL (script error)'; |
8 |
|
|
|
9 |
|
|
try { |
10 |
|
|
document.charset = 'euc-jp'; |
11 |
|
|
|
12 |
|
|
if (document.charset.toLowerCase () == 'euc-jp') { |
13 |
|
|
result.firstChild.data = 'PASS'; |
14 |
|
|
result.className = 'PASS'; |
15 |
|
|
} else { |
16 |
|
|
result.firstChild.data = 'FAIL (' + document.charset + ')'; |
17 |
|
|
} |
18 |
|
|
} catch (e) { |
19 |
|
|
result.firstChild.data = 'FAIL (' + e + ')'; |
20 |
|
|
} |
21 |
|
|
</script> |