mirror of
https://github.com/flutter/flutter.git
synced 2026-02-20 02:29:02 +08:00
19 lines
403 B
HTML
19 lines
403 B
HTML
<input id="field" />
|
|
<div id="message"></div>
|
|
<script>
|
|
var field = document.getElementById('field');
|
|
|
|
field.addEventListener('blur', function() {
|
|
document.getElementById('message').innerText += 'blur';
|
|
|
|
field.addEventListener('focus', function() {
|
|
document.getElementById('message').innerText += 'focus';
|
|
});
|
|
|
|
field.blur();
|
|
field.focus();
|
|
});
|
|
|
|
field.focus();
|
|
</script>
|