dhtml|动态|图形
1)<html>
<head>
<script language="JavaScript">
function setHeight()
{
var x=document.images
x[0].height="250"
}
</script>
</head>
<body>
<img src="http://edu.cnzz.cn/images/compman.gif" width="107" height="98" />
<form>
<input type="button" value="Change height">
</form>
</body>
</html>
2)<html>
<head>
<script language="JavaScript">
function setSrc()
{
var x=document.images
x[0].src="http://edu.cnzz.cn/images/hackanm.gif"
}
</script>
</head>
<body>
<img src="http://edu.cnzz.cn/images/compman.gif" width="107" height="98" />
<form>
<input type="button" value="Change image">
</form>
</body>
</html>
3)<html>
<head>
<script language="JavaScript">
function setWidth()
{
var x=document.images
x[0].width="300"
}
</script>
</head>
<body>
<img src="http://edu.cnzz.cn/images/compman.gif" width="107" height="98" />
<form>
<input type="button" value="Change width">
</form>
</body>
</html>
注意,图形文件换成自己的文件,试试,不错吧 转自:动态网制作指南 www.knowsky.com