<html> | |
<body> | |
<label id="label">Label: <input type=text onfocus="document.getElementById('output').innerHTML = 'THIS TEST HAS PASSED'"></label> | |
<div id="output"> | |
THIS TEST HAS FAILED | |
</div> | |
<script> | |
document.getElementById('label').focus() | |
</script> | |
</body> | |
</html> | |