onLoad

ページや画像などデータの読み込みが完了した時に発生します。

構文

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

例文

<html>
 <head>
  <title>onLoad</title>
  <script type="text/javascript"><!--
  window.onload = function() {
   document.getElementById("result").innerHTML = "Load";
  }
  // --></script>
 </head>
 <body>
 <div id="result"></div>
 <img src="photo.jpg" width="300" height="196">
 </body>
</html>

関連記事

スポンサーリンク

DROP INDEX インデックスを削除する

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

上に戻る