<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>swap</title>
<script type="text/javascript">
function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}

function MM_swapImgRestore() { //v3.0
  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}

function MM_findObj(n, d) { //v4.01
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}

function MM_swapImage() { //v3.0
  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}
</script>
</head>

<body onLoad="MM_preloadImages('https://dl.dropboxusercontent.com/s/1hagie9b8inebnk/swap1.png','https://dl.dropboxusercontent.com/s/s3goph5yie8pqm0/btn01%20_om.png','https://dl.dropboxusercontent.com/s/zyr7dfxhvdm97xx/swap2.png','dl.dropboxusercontent.com/s/bevm6n818vw6p22/btn02%20_on.png','https://dl.dropboxusercontent.com/s/hmkvt623x6v2yn1/swap3.png','https://dl.dropboxusercontent.com/s/sw2ojf8zi419mw0/btn03%20_on.png')">
<h1>スワップ練習</h1>
<table width="300">
  <tbody>
    <tr>
      <td colspan="3"><img src="https://dl.dropboxusercontent.com/s/6rtc1i806f6pt4s/swap%E5%85%83.png" alt="" width="300" height="300" id="swap"/></td>
    </tr>
    <tr>
      <td><a href="#"><img src="https://dl.dropboxusercontent.com/s/45rfy9sojjzvtsk/btn01.png" alt="" width="100" height="100" id="btn01" onMouseOver="MM_swapImage('swap','','https://dl.dropboxusercontent.com/s/1hagie9b8inebnk/swap1.png','btn01','','https://dl.dropboxusercontent.com/s/s3goph5yie8pqm0/btn01%20_om.png',1)" onMouseOut="MM_swapImgRestore()"/></a></td>
      <td><a href="#"><img src="https://dl.dropboxusercontent.com/s/ubx0hf3sk1tvuqa/btn02.png" alt="" width="100" height="100" id="btn02" onMouseOver="MM_swapImage('swap','','https://dl.dropboxusercontent.com/s/zyr7dfxhvdm97xx/swap2.png','btn02','','https://dl.dropboxusercontent.com/s/bevm6n818vw6p22/btn02%20_on.png?dl=0',1)" onMouseOut="MM_swapImgRestore()"/></a></td>
      <td><a href="#"><img src="https://dl.dropboxusercontent.com/s/6pzuz4f2cdxzfy9/btn03.png" alt="" width="100" height="100" id="btn03" onMouseOver="MM_swapImage('swap','','https://dl.dropboxusercontent.com/s/hmkvt623x6v2yn1/swap3.png','btn03','','https://dl.dropboxusercontent.com/s/sw2ojf8zi419mw0/btn03%20_on.png',1)" onMouseOut="MM_swapImgRestore()"/></a></td>
    </tr>
  </tbody>
</table>
<p>&nbsp;</p>
</body>
</html>

External CSS

This Pen doesn't use any external CSS resources.

External JavaScript

This Pen doesn't use any external JavaScript resources.