随时改变文字大小的程序
2006-10-30 08:22
330 查看
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>无标题文档</title>
</head>
<SCRIPT language=JavaScript type=text/JavaScript>
//更改字体大小
var status0='';
var curfontsize=10;
var curlineheight=18;
function fontZoomA(){
if(curfontsize>8){
document.getElementById('fontzoom').style.fontSize=(--curfontsize)+'pt';
document.getElementById('fontzoom').style.lineHeight=(--curlineheight)+'pt';
}
}
function fontZoomB(){
if(curfontsize<64){
document.getElementById('fontzoom').style.fontSize=(++curfontsize)+'pt';
document.getElementById('fontzoom').style.lineHeight=(++curlineheight)+'pt';
}
}
</SCRIPT>
<body>
<table style="WORD-BREAK: break-all">
<TR vAlign=center align=middle>
<TD style="WORD-BREAK: break-all" height=0></TD></TR>
<TR align=middle>
<TD width=581>
<P align=right>字体:<A href="javascript:fontZoomA();">缩小</A> _fcksavedurl=""javascript:fontZoomA();">缩小</A>" <A href="javascript:fontZoomB();">放大</A></P></TD></TR>
<TR>
<TD id=fontzoom style="WORD-BREAK: break-all"
vAlign=top> aaaa</TD></TR>
</TABLE>
</body>
</html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>无标题文档</title>
</head>
<SCRIPT language=JavaScript type=text/JavaScript>
//更改字体大小
var status0='';
var curfontsize=10;
var curlineheight=18;
function fontZoomA(){
if(curfontsize>8){
document.getElementById('fontzoom').style.fontSize=(--curfontsize)+'pt';
document.getElementById('fontzoom').style.lineHeight=(--curlineheight)+'pt';
}
}
function fontZoomB(){
if(curfontsize<64){
document.getElementById('fontzoom').style.fontSize=(++curfontsize)+'pt';
document.getElementById('fontzoom').style.lineHeight=(++curlineheight)+'pt';
}
}
</SCRIPT>
<body>
<table style="WORD-BREAK: break-all">
<TR vAlign=center align=middle>
<TD style="WORD-BREAK: break-all" height=0></TD></TR>
<TR align=middle>
<TD width=581>
<P align=right>字体:<A href="javascript:fontZoomA();">缩小</A> _fcksavedurl=""javascript:fontZoomA();">缩小</A>" <A href="javascript:fontZoomB();">放大</A></P></TD></TR>
<TR>
<TD id=fontzoom style="WORD-BREAK: break-all"
vAlign=top> aaaa</TD></TR>
</TABLE>
</body>
</html>
相关文章推荐
- 如何用PB程序在excel画表格边框线,如何改变文字大小
- Qt 程序改变文字大小
- Android O新特性之Autosizing TextViews(随着TextView宽高而自动改变文字大小)
- 微信小程序 改变radio(单选钮)默认大小
- 分享非常有用的Java程序 (关键代码)(四)---动态改变数组的大小
- js根据浏览器窗口大小实时改变网页文字大小
- 2014-05-13MFC对话框:改变MFC中按钮的文字,更改窗体的大小,通过类名能够查找到该类对应的对话框,MFC中获取文本框中的内容,updatedata函数,两种对话框比较,oncreate起点
- eclipse中改变文字的大小
- 从0开始架构一个IOS程序——iOS 根据文字的长度来动态设置UILabel的大小
- 分享非常有用的Java程序 (关键代码)(四)---动态改变数组的大小
- IOS label导入带html标签文字,并且可以改变字体大小
- android 改变spinner的文字大小 颜色的思路
- MFC中改变编辑框文字大小、颜色的方法
- iOS_UIWebView背景颜色、文字颜色、文字大小的改变
- 改变程序显示模式(获取窗口大小、状态栏大小、标题栏大小、边框大小)
- Android改变部分文字的字体大小
- win7自带画图程序里的橡皮擦的大小怎么改变?
- windows mobile 6.0系统中自己制作的今日插件,通过“开始-设置-系统-屏幕-文字大小”调整文字大小后,插件上的文字大小不改变!
- vc++ 单文档程序添加窗口移动事件(不是大小改变),以实现子窗口的伴随移动
- iOS —— Attributes文字的操作,TextFiel框内文字颜色大小等改变