例えば<div>でfocusイベントを発生させたい場合。 これやりたくて先日小一時間悩んだ。 解は簡単で、tabindex属性をつければOK。<div tabindex="0">みたいに。そうすればそのエレメントでfocus,blurイベントが発生するようになる。 tabindex属性はグローバル属性なので、すべてのエレメントにつけることができる。 以上 Register as a new user and use Qiita more conveniently You get articles that match your needsYou can efficiently read back useful informationYou can use dark themeWhat you can do with signing up