6 var item
= document
.createElement("li");
7 item
.appendChild(document
.createTextNode(message
));
8 document
.getElementById("console").appendChild(item
);
12 if (window
.testRunner
)
13 testRunner
.dumpAsText();
15 document
.getElementById("1").focus();
16 document
.getElementById("2").focus();
17 document
.getElementById("3").focus();
21 <body onload=
"test()">
22 <p>This test checks to see if focus methods work on a couple types of elements.
</p>
23 <p>If the test passes, you should see a line saying
"focused 1", then
2, then
3.
</p>
26 <fieldset><legend id=
"1">Legend
</legend><input onfocus=
"log('focused 1')" type=
"text"></fieldset>
27 <label id=
"2">Label2
<input onfocus=
"log('focused 2')" type=
"text"></label></td>
28 <label id=
"3" for=
"input3">Label3
</label><input onfocus=
"log('focused 3')" id=
"input3" type=
"text">
31 <ol id=
"console"></ol>