11 lines
967 B
HTML
11 lines
967 B
HTML
<html>
|
|
<body onload="document.getElementById('sp').focus(); document.getElementById('sp').blur(); document.getElementById('sp2').focus();">
|
|
This test uses the new text field to test focus() and blur() and to make sure that onFocus and onBlur events fire correctly.
|
|
<p>
|
|
<input type="text" id="sp" value="My Text Field 1" style="-khtml-appearance: textfield;" onfocus="document.getElementById('result').innerHTML+='<br>Test Passed. Text field 1\'s onFocus event has fired.'" onblur="document.getElementById('result').innerHTML+='<br>Test Passed. Text field 1\'s onBlur event has fired.'"></input>
|
|
<input type="text" id="sp2" value="My Text Field 2" style="-khtml-appearance: textfield;" onfocus="document.getElementById('result').innerHTML+='<br>Test Passed. Text field 2\'s onFocus event has fired.'" onblur="document.getElementById('result').innerHTML+='<br>Test Passed. Text field 2\'s onBlur event has fired.'"></input>
|
|
|
|
<div id="result"></div>
|
|
</p>
|
|
</body>
|
|
</html> |