案例:javascript案例     状态:可编辑再运行    进入竖版
 运行结果 
x
 
1
<html>
2
<head>
3
<script type="text/javascript">
4
function changeSize()
5
{
6
document.getElementById("compman").height="270"
7
document.getElementById("compman").width="164"
8
}
9
</script>
10
</head>
11
12
<body>
13
<img id="compman" src="/img/eg_bulbon.gif" />
14
<br /><br />
15
<input type="button" onclick="changeSize()" value="改变图像的高度和宽度">
16
</body>
17
18
</html>
19