有没有办法取得当前系统可用字体?

我想允许访客在客户端改变显示的字体,可是如何取得客户端可用的字体呢?
---------------------------------------------------------------

IE 6.0

 1<html>
 2<head>
 3<title></title>
 4<script type="text/javascript">   
 5function getSystemFonts(){   
 6var cnt = dlgHelper.fonts.count   
 7var str = "系统字体总数:" + cnt + "\n\n"   
 8var list = new Array()   
 9for (var i = 1; i < cnt; i++){   
10list.push(dlgHelper.fonts(i))   
11}   
12alert(str + list.sort().join("\t"))   
13}   
14</script>
15</head>
16<body>
17<object classid="clsid:3050f819-98b5-11cf-bb82-00aa00bdce0b" height="0px" id="dlgHelper" width="0px"></object>
18<input onclick="getSystemFonts()" type="button" value="取得系统字体"/>
19</body>
20</html>
Published At
Categories with Web编程
comments powered by Disqus