43 lines
1.0 KiB
HTML
43 lines
1.0 KiB
HTML
<!DOCTYPE HTML>
|
|
<html>
|
|
<head>
|
|
<script src="../../resources/js-test-pre.js"></script>
|
|
</head>
|
|
<body>
|
|
<p id="description"></p>
|
|
<div id="console"></div>
|
|
|
|
<select>
|
|
<option id="o1">text</option>
|
|
<option id="o2" value="value">text</option>
|
|
<option id="o3" label="label">text</option>
|
|
<option id="o4" value="value" label="label">text</option>
|
|
</select>
|
|
|
|
<script>
|
|
description('Test for .value and .label of OPTION element');
|
|
|
|
var o1 = document.getElementById('o1');
|
|
shouldBe('o1.value', '"text"');
|
|
shouldBe('o1.label', '"text"');
|
|
shouldBe('o1.text', '"text"');
|
|
|
|
var o2 = document.getElementById('o2');
|
|
shouldBe('o2.value', '"value"');
|
|
shouldBe('o2.label', '"text"');
|
|
shouldBe('o2.text', '"text"');
|
|
|
|
var o3 = document.getElementById('o3');
|
|
shouldBe('o3.value', '"text"');
|
|
shouldBe('o3.label', '"label"');
|
|
shouldBe('o3.text', '"text"');
|
|
|
|
var o4 = document.getElementById('o4');
|
|
shouldBe('o4.value', '"value"');
|
|
shouldBe('o4.label', '"label"');
|
|
shouldBe('o4.text', '"text"');
|
|
</script>
|
|
<script src="../../resources/js-test-post.js"></script>
|
|
</body>
|
|
</html>
|