最新消息: 新版网站上线了!!!

网页字体大中小代码

<SCRIPT language=JavaScript type=text/JavaScript> 

//更改字体大小,注意函数的大小写要区分 
var status0=''; 
function fontzoomA(){ 
document.getElementById('fontzoom').style.fontSize='12px'; 

function fontzoomB(){ 
document.getElementById('fontzoom').style.fontSize='24px'; 

function fontzoomC(){ 
document.getElementById('fontzoom').style.fontSize='48px'; 

</SCRIPT>

<div style=font-size:14 > 
<a style="cursor:hand" onclick="fontzoomC();" >大</a> 
<a style="cursor:hand" onclick="fontzoomB();" >中</a> 
<a style="cursor:hand" onclick="fontzoomA();" >小</a> 
</div>
调用方法

<div id=fontzoom style=font-size:14 >要更改字体大小的文本</div>

转载请注明:谷谷点程序 » 网页字体大中小代码