网站常用代码

实现字体大中小的另一种方法

发表日期:2011-10-28 文章来源:本站 浏览:
<!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>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>实现字体大中小的另一种方法-商艺网络</title>
<style type="text/css">
<!--
body {font-size:14px}
-->
</style>
<SCRIPT type=text/javascript>
function $(xixi) {
return document.getElementById(xixi);
}
//转换字号
function doZoom(size){
 if(size==12){
  $("contentText").style.fontSize = size + "px";
  $("fs12").style.display = "";
  $("fs14").style.display = "none";
  $("fs16").style.display = "none";
 }
 if(size==14){
  $("contentText").style.fontSize = size + "px";
  $("fs12").style.display = "none";
  $("fs14").style.display = "";
  $("fs16").style.display = "none";
 }
 if(size==16){
  $("contentText").style.fontSize = size + "px";
  $("fs12").style.display = "none";
  $("fs14").style.display = "none";
  $("fs16").style.display = "";
 }
}
</SCRIPT>
</head>
<body>
<DIV class=fontSize id=fs12 style="DISPLAY: none"><A 
href="javascript:doZoom(16)">大</A> <A 
href="javascript:doZoom(14)">中</A> <SPAN>小</SPAN></DIV>
<DIV class=fontSize id=fs14><A 
href="javascript:doZoom(16)">大</A> <SPAN>中</SPAN> <A 
href="javascript:doZoom(12)">小</A></DIV>
<DIV class=fontSize id=fs16 style="DISPLAY: none"><SPAN>大</SPAN> <A 
href="javascript:doZoom(14)">中</A> <A 
href="javascript:doZoom(12)">小</A></DIV>
<br /><br />
<DIV id=contentText>商艺网络 学会偷懒,并懒出境界是提高工作效率最有效的方法!</DIV>
<p>说明:此方法有别于之前发布的<a href="http://www.xw62.com/js/text-239.html" target="_blank">字号缩放代码</a>,点击链接后,当前字号则不显示链接。</p>
<p>整理:商艺网络</p>
<p>查找更多代码,请访问:<a href="http://www.xw62.com" target="_blank">商艺网络</a></p>
</body>
</html>
公司座机:0797-8296060 免费服务热线:0797-8296060 400-1010-719
业务QQ:192087878 511889889 公司地址:赣州市章贡区安虔路22号A栋(203)
朝扬网络提供

高端网站建设

赣州网站建设公司

赣州网站建设

  
我们只做有价值的网站!
更多
2006-2020 © 赣州网站建设|赣州做网站|赣州网站建设价格|赣州网页制作|赣州建网站公司|电话:0797-8296060|赣州朝扬网络科技有限公司
赣ICP备15004771号
赣公安网备案编号:36070202000754
工商编号:360702210040706

赣公网安备 36070202000754号