<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Image</title>
<style rel="stylesheet" type="text/css">
<!--
body{
background:#666;
margin:0;
padding:0;
font-family:Verdana, Arial, Helvetica, sans-serif;
font-size:12px;
color:#fff;
}
a:link,a:visited,a:active{
text-decoration:none;
color:#fff;
font-size:12px;
}
a:hover{
text-decoration:underline;
color:#0cf;
font-size:12px;
}
.content{
width:400px;
margin:0 auto;
}
ul{
margin:0;
padding:0;
list-style-type:none;
}
li{
margin-bottom:10px;
float:left;
padding-right:20px;
}
-->
</style>
<script language="javascript" type="text/javascript">
function showPic(whichpic){
var source = whichpic.getAttribute("href");
var placeholder = document.getElementById("placeholder");
placeholder.setAttribute("src",source);
var text = whichpic.getAttribute("title");
var description = document.getElementById("description");
description.firstChild.nodeValue = text;
}
</script>
</head>
<body>
<div class="content">
<h1>One day morning</h1>
<ul>
<li><a href="http://ice-cream.iteye.com/upload/picture/pic/8580/727a3394-9931-3dd5-a91a-3d6939c17f6f.gif" title="One day morning,I first open my eyes and get up." onclick="showPic(this);return false;">1.Get up</a></li>
<li><a href="http://ice-cream.iteye.com/upload/picture/pic/8578/67a50c92-bb8f-35c1-ac42-b3ef20d7905d.gif" title="I come to the toilet to brush my teeth." onclick="showPic(this);return false;">2.Brush teeth</a></li>
<li><a href="http://ice-cream.iteye.com/upload/picture/pic/8576/63f36ddd-424d-3342-9194-5a056b6ca509.gif" title="Then wash my face to become sober." onclick="showPic(this);return false;">3.Wash face</a></li>
<li><a href="http://ice-cream.iteye.com/upload/picture/pic/8574/87f1dd65-fd7e-362f-8861-ee53ef4e0314.gif" title="Next to mirror to comb my hair,and over" onclick="showPic(this);return false;">4.Comb hair</a></li>
</ul>
<img id="placeholder" src="http://ice-cream.iteye.com/upload/picture/pic/8572/bf42aa6e-fec4-31f1-9814-361234b93ca7.gif" alt="a beautiful day's morning" />
<p id="description">Choose an image.</p>
</div>
</body>
</html>
javascript美术馆
最新推荐文章于 2019-02-20 11:05:21 发布