onFocusIn

フォーカスされた時に発生するイベントです。

構文

<タグ名 onFocusIn="イベント発生時の処理">
オブジェクト.onfocusin = "イベント発生時の処理"

例文

<html>
 <head>
  <title>onFocusIn</title>
  <script type="text/javascript"><!--
  window.onload = function() {
   document.getElementById("tField").onfocusin = function(){
    document.getElementById("result").innerHTML = "Focus In";
   }
  }
  // --></script>
 </head>
 <body>
 <form>
  <input type="text" id="tField">
 </form>
 <div id="result"></div>
 </body>
</html>

関連記事

スポンサーリンク

iPhoneアプリやAndroidアプリを簡単に作成する方法 ハイブリッドアプリケーション

ホームページ製作・web系アプリ系の製作案件募集中です。

上に戻る