Here's my code:
<input id="m" autocomplete="off"/>
and I put the following lines in script
$('#m').on('blur', alert('blurred'););
$('#m').on('focus', alert('focused'););
The result is, it will pop up 'blurred' when the page starts. But afterward, it no longer fires the alert('blurred')
.
More interesting is, the focus()
works well.
Thanks for any suggestion or help.
Aucun commentaire:
Enregistrer un commentaire