大中小字体显示

大中小字体显示
<! DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd" >
< html xmlns ="http://www.w3.org/1999/xhtml" >
< head >
< title > 大中小字体显示 </ title >
</ head >
< body >
< a href ="#" onclick ="changeFontSize(document.getElementById('content'),this.style.fontSize);return false;"
style
="font-size: 16px;" > </ a >
< a href ="#" onclick ="changeFontSize(document.getElementById('content'),this.style.fontSize);return false;"
style
="font-size: 14px;" > </ a >
< a href ="#" onclick ="changeFontSize(document.getElementById('content'),this.style.fontSize);return false;"
style
="font-size: 12px;" > </ a >
< div id ="content" >
京藏高速通畅四天后再次堵车上百公里
< p >
< font size ="3" > &nbsp;&nbsp;&nbsp; 昨日上午8点,央视记者沿鄂尔多斯历时3个多小时,仅行进120多公里,
到达河北东洋河收费站。此时,收费站双向放行,交通拥堵有所缓解。
</ font ></ p >
< p >
< font size ="3" > &nbsp;&nbsp;&nbsp; 据了解,截至昨日中午12点,内蒙古境内拥堵情况最长达120公里。
据测算,上万车辆滞留。 其主要原因一是大货车停车后,启动速度慢,二是不少大货车司机堵车期间睡着了。
</ font ></ p >
</ div >

< script language ="javascript" >
function changeFontSize(pucl,size)
{
if (pucl.style)
pucl.style.fontSize
= size;
for ( var i = 0 ;i < pucl.childNodes.length;i ++ )
{
changeFontSize(pucl.childNodes[i],size)
}
}
</ script >

</ body >
</ html >

转载于:https://www.cnblogs.com/heihaozi/archive/2010/09/03/1816767.html

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值