30 lines
753 B
HTML
30 lines
753 B
HTML
<html>
|
|
<head>
|
|
<title>autofocus attribute test</title>
|
|
<script language="JavaScript" type="text/javascript">
|
|
function log(message) {
|
|
document.getElementById("console").innerHTML += "<li>"+message+"</li>";
|
|
}
|
|
|
|
function test() {
|
|
if (window.testRunner)
|
|
testRunner.dumpAsText();
|
|
|
|
var a = document.getElementsByTagName("input");
|
|
for (i = 0; i < a.length; i++)
|
|
a.item(i).autofocus ? log("YES") : log("NO");
|
|
}
|
|
</script>
|
|
</head>
|
|
<body onload="test()">
|
|
<p>This test checks for the autofocus attribute. Autofocus is set on the first
|
|
and on the third input. Success on "YES NO YES".</p>
|
|
<input autofocus id="one"/>
|
|
<input/>
|
|
<input autofocus/>
|
|
<hr>
|
|
<ol id="console"></ol>
|
|
</body>
|
|
</html>
|
|
|