29 lines
834 B
HTML
29 lines
834 B
HTML
<!DOCTYPE html>
|
|
<html>
|
|
<body>
|
|
<form>
|
|
<input type="text" name="someName" value="firstItem" checked>
|
|
<input type="text" name="someName" value="secondItem" checked>
|
|
<input type="text" name="someName" value="thirdItem" checked>
|
|
</form>
|
|
<script src="../../resources/js-test-pre.js"></script>
|
|
<script>
|
|
|
|
description("RadioNodeList should respond to type attribute change.");
|
|
|
|
|
|
var form = document.querySelector('form');
|
|
var nodeList;
|
|
|
|
debug("Initially, there are three input elements with type=text.");
|
|
evalAndLog("nodeList = form.elements.namedItem('someName');");
|
|
shouldBe("nodeList.length", "3");
|
|
shouldBe("document.getElementsByTagName('input')[2].type = 'image'; nodeList.length", "2");
|
|
shouldBe("document.getElementsByTagName('input')[2].type = 'radio'; nodeList.length", "3");
|
|
|
|
form.style.display = 'none';
|
|
|
|
</script>
|
|
</body>
|
|
</html>
|