获取当前系统字体

None.gif <!--  
None.gif宝玉 2004-2-26
None.gif[url]http://www.webuc.net[/url]
None.gif[url]http://www.nwpubbs.net[/url]
None.gif
-->
None.gif
<! DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" >
None.gif
< HTML >
None.gif
< HEAD >
None.gif
< TITLE >  获取当前系统字体和排版样式  </ TITLE >
None.gif
ExpandedBlockStart.gifContractedBlock.gif
< SCRIPT  LANGUAGE ="JavaScript" > dot.gif
InBlock.gif
<!--
ExpandedSubBlockStart.gifContractedSubBlock.gif
function getSystemFonts()dot.gif{
InBlock.gif    
var a=dlgHelper.fonts.count;
InBlock.gif    
var fArray = new Array();
InBlock.gif    
var oDropDown = document.all.fonts;
ExpandedSubBlockStart.gifContractedSubBlock.gif    
for (i = 1;i < dlgHelper.fonts.count;i++)dot.gif
InBlock.gif        fArray[i] 
= dlgHelper.fonts(i);
InBlock.gif        
var aOptions = oDropDown.options;    
InBlock.gif        
var oOption = document.createElement("OPTION");
InBlock.gif        aOptions.add(oOption);    
InBlock.gif        oOption.text 
= fArray[i];
InBlock.gif        oOption.Value 
= i;
ExpandedSubBlockEnd.gif    }
 
ExpandedSubBlockEnd.gif}

InBlock.gif
ExpandedSubBlockStart.gifContractedSubBlock.gif
function getBlockFormats()dot.gif{
InBlock.gif    
var a=dlgHelper.blockFormats.count;
InBlock.gif    
var fArray = new Array();
InBlock.gif    
var oDropDown = document.all.formats;
InBlock.gif    oDropDown.setAttribute(
"id","FormatList");
InBlock.gif    
for (i = 1;i < dlgHelper.blockFormats.count;i++)
ExpandedSubBlockStart.gifContractedSubBlock.gif    
dot.gif
InBlock.gif        fArray[i] 
= dlgHelper.blockFormats(i);
InBlock.gif        
var aOptions = oDropDown.options;    
InBlock.gif        
var oOption = document.createElement("OPTION");
InBlock.gif        aOptions.add(oOption);    
InBlock.gif        oOption.text 
= fArray[i];
InBlock.gif        oOption.Value 
= i;
ExpandedSubBlockEnd.gif    }
 
ExpandedSubBlockEnd.gif}

ExpandedBlockEnd.gif
//-->
None.gif
</ SCRIPT >
None.gif
</ HEAD >
None.gif
None.gif
< BODY  onload ="getSystemFonts();getBlockFormats()" >
None.gif系统字体和排版样式 SystemFont and BlockFormats
< BR >
None.gif
< SELECT  NAME ="fonts"  onchange ="document.body.style.fontFamily = this.options[this.selectedIndex].text" >
None.gif
</ SELECT >
None.gif 
< SELECT  NAME ="formats"  onchange ="document.body.style.fontFamily = this.options[this.selectedIndex].text" >
None.gif
</ SELECT >
None.gif
< OBJECT  ID =dlgHelper  CLASSID ="clsid:3050f819-98b5-11cf-bb82-00aa00bdce0b"  WIDTH ="0px"  HEIGHT ="0px" ></ OBJECT >
None.gif
</ BODY >
None.gif
</ HTML >
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值