blob: c60c9ae790726657939a8e5a477ab64da45c4926 [file] [log] [blame]
<html>
<head>
<title>"autofocus" and the blur() method</title>
<style>
input { background:lime }
input:focus { background:red }
</style>
<script language="JavaScript" type="text/javascript">
var gotBlur = false;
function log(message) {
document.getElementById("console").innerHTML += "<li>"+message+"</li>";
}
function switchBlur() {
gotBlur = true;
}
function test() {
if (window.layoutTestController)
layoutTestController.dumpAsText();
if (gotBlur)
log("SUCCESS");
else
log("FAILURE");
}
</script>
</head>
<body onload="test()">
<p>The form control below should have a green background:
<p><input autofocus onfocus="this.blur()" onblur="switchBlur()">
<hr/>
<ol id="console"></ol>
</body>
</html>