34 lines
960 B
HTML
34 lines
960 B
HTML
<html>
|
|
<head>
|
|
<script>
|
|
function log(message)
|
|
{
|
|
var item = document.createElement("li");
|
|
item.appendChild(document.createTextNode(message));
|
|
document.getElementById("console").appendChild(item);
|
|
}
|
|
function test()
|
|
{
|
|
if (window.testRunner)
|
|
testRunner.dumpAsText();
|
|
|
|
document.getElementById("1").focus();
|
|
document.getElementById("2").focus();
|
|
document.getElementById("3").focus();
|
|
}
|
|
</script>
|
|
</head>
|
|
<body onload="test()">
|
|
<p>This test checks to see if focus methods work on a couple types of elements.</p>
|
|
<p>If the test passes, you should see a line saying "focused 1", then 2, then 3.</p>
|
|
<hr>
|
|
<p>
|
|
<fieldset><legend id="1">Legend</legend><input onfocus="log('focused 1')" type="text"></fieldset>
|
|
<label id="2">Label2<input onfocus="log('focused 2')" type="text"></label></td>
|
|
<label id="3" for="input3">Label3</label><input onfocus="log('focused 3')" id="input3" type="text">
|
|
<p>
|
|
<hr>
|
|
<ol id="console"></ol>
|
|
</body>
|
|
</html>
|