Image.uniqueID

画像(イメージ)オブジェクトの内部ID名を示します。このプロパティはWindows版Internet Explorer 5以降で利用できます。

構文

画像オブジェクト.uniqueID

例文

<html>
 <head>
  <title>Image.uniqueID</title>
  <script type="text/javascript"><!--
  window.onload = function() {
   var txt = document.getElementById("myPhoto").uniqueID;
   document.getElementById("result").innerHTML = txt;
  }
  // --></script>
 </head>
 <body>
 <img src="photo.gif" id="myPhoto">
 <div id="result"></div>
 </body>
</html>

関連記事

スポンサーリンク

deleteOnExit()メソッドは環境によって動作が違う JVM+Windows

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

上に戻る