动态改变字体大小

<script>
function ChangeSize(size)
{
document.getElementById('fID').style.fontSize=size+'px';
}
</script>

<div id="textSize">
<font size="1" style="cursor:pointer" color="#551A8B" onClick="ChangeSize('10');">小</font>
<font size="2" style="cursor:pointer" color="#551A8B" onClick="ChangeSize('12');">中</font>
<font size="3" style="cursor:pointer" color="#551A8B" onClick="ChangeSize('14');">大</font>
</div>

<div id="fID" name="fID" class="Size1">
动态改变文字的大小
</div>

你可能感兴趣的:(动态)