<A href='javascript:' onclick='document.getElementById("d").style.fontSize="20px"'>大</A>
<A href='javascript:' onclick='document.getElementById("d").style.fontSize="15px"'>中</A>
<A href='javascript:' onclick='document.getElementById("d").style.fontSize="10px"'>小</A>
<div id="d" style="font-size:15px">
<P>
ADCBD
</P>
<P>
ADCBD
</P>
</div>
<head>
<meta http-equiv="Content-Language" content="zh-cn">
</head><script>
function changefontsize(x)
{
document.getElementById("pet").style.fontSize=x;
}
</script>
<div id=pet>点击按钮改变文字大小</div>
<input type=button value=" 大 " onclick=changefontsize("50px")><input type=button value=" 中 " onclick=changefontsize("15px")><input type=button value=" 小 " onclick=changefontsize("7px")>
明月几时有?
</div>
<input type="button" value="小" onclick="setSize(1)"/>
<input type="button" value="中" onclick="setSize(2)"/>
<input type="button" value="大" onclick="setSize(3)"/>
<script>
function setSize(v){document.getElementById("divContent").style.fontSize = v*10;}
</script>