Javascript コード:
<script type="text/javascript">
function react() {
document.getElementById("img").src = second.jpg
}
</script>
HTML ページ:
<div style="width:170px;height:160px;border:2px solid blue">
<img src="first.jpg" style="width:inherit;height:inherit" id="img" onload="setTimeout('react()', 15000)"/>
</div>
setTimeout() 関数で設定された 15000 ミリ秒で first.jpg から second.jpg に変更されるため、 の画像は変更されません。