javascript

<html>
<body>
 <head>
<script>
function changeImage()
{
var element=document.getElementById('myimage');

  element.src="1.jpg";
 
}
</script>

</head>
<h1>This is Page1</h1>
<p>This is some text.</p>
 <img id="myimage" src="" style="width:100px;height:100px/>
 <input name="jfal" type='button' onclick="changeImage()">
</body>
</html>

 

posted @ 2014-11-27 17:09  _一千零一夜  阅读(114)  评论(0编辑  收藏  举报