当前位置 : 主页 > 编程语言 > java >

字体大中小代码&字号缩放代码

来源:互联网 收集:自由互联 发布时间:2022-07-22
!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" / styl
<!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" />
<style type="text/css">
<!--
body {font-size:14px}
-->
</style>
<title>字体大中小代码&字号缩放代码-懒人图库</title>
</head>

<body>
<script type="text/javascript">
function doZoom(size) {
var zoom = document.all ? document.all['Zoom'] : document.getElementByIdx('Zoom');
zoom.style.fontSize = size + 'px';
}
</script>
字体大小:<a href="javascript:doZoom(12)">小</a> <a href="javascript:doZoom(14)">中</a> <a href="javascript:doZoom(16)">大</a>
<br /><br />
<div id="Zoom">懒人图库 学会偷懒,并懒出境界是提高工作效率最有效的方法!</div>
</body>
</html>
网友评论