<script>
window.onload = rolloverInit;
function rolloverInit(){
for(var i=0; i<document.links.length; i++){
var linkObj = document.links[i];
if(linkObj.className){
var imgObj = document.getElementById(linkObj.className);
if(imgObj){
setupRollover(linkObj, imgObj);
}
}
}
}
function setupRollover(thisLink, textImage){
thisLink.imgToChange = textImage;
thisLink.onmouseout = function(){
this.imgToChange.src = this.outImage.src;
}
thisLink.onmouseover = function(){
this.imgToChange.src = this.overImage.src;
}
thisLink.outImage = new Image();
thisLink.outImage.src = textImage.src;
thisLink.overImage = new Image();
thisLink.overImage.src = "images/" + thisLink.id + ".png";
}
</script>
</head>
<body>
<div class="left">
<img src="images/海.png">
<a href="#" class="ss" id="haiou"><img src="images/海鸥.jpg" height="100" width="100"></a>
<a href="#" class="ss" id="richu"><img src="images/海上日光.jpg" height="100" width="100"></a>
<a href="#" class="ss" id="haichuang"><img src="images/海之船.jpg" height="100" width="100"></a>
</div>
<div class="right">
<img src="images/背景.png">
</div>
永恒君
qq_博行天下_04396621
相关分类