2014年4月14日 星期一

LAB17


<html>
<body>

<div onmouseover="mOver1(this)" onmouseout="mOut1(this)" style="background-color:#D94A38;width:120px;height:20px;padding:40px;">1</div>

<div onmouseover="mOver2(this)" onmouseout="mOut2(this)" style="background-color:#D94A38;width:120px;height:20px;padding:40px;">2</div>

<div onmouseover="mOver3(this)" onmouseout="mOut3(this)" style="background-color:#D94A38;width:120px;height:20px;padding:40px;">3</div>



<script>
function mOver1(obj)
{
obj.innerHTML= '<img src="http://images.fantasteen.com/images/base/profile/25000/1016_sm_wh48.jpg" width="450" height="338" border="0">'
}

function mOver2(obj)
{
obj.innerHTML='<img src="http://www.webmastergrade.com/wp-content/uploads/2009/09/Dolphin-Picture.jpg" width="450" height="338" border="0">'
}
function mOver3(obj)
{
obj.innerHTML='<img src="http://upload.wikimedia.org/wikipedia/commons/a/a0/Waterfalls-picture_-_West_Virginia_-_ForestWander.jpg" width="450" height="338" border="0">'
}

function mOut1(obj)
{
obj.innerHTML="1"
}
function mOut2(obj)
{
obj.innerHTML="2"
}
function mOut3(obj)
{
obj.innerHTML="3"
}
</script>

</body>
</html>


1
2
3

沒有留言:

張貼留言