HTML编辑器中得到系统的字体
类别: JavaScript教程
HTML>
<HEAD>
<TITLE></TITLE>
<SCRIPT type="text/javascript">
function getSystemFonts(){
var cnt = dlgHelper.fonts.count
var str = "系统字体总数:" + cnt + "nn"
var list = new Array()
for (var i = 1; i < cnt; i++){
list.push(dlgHelper.fonts(i))
}
alert(str + list.sort().join("t"))
}
</SCRIPT>
</HEAD>
<BODY>
<OBJECT id="dlgHelper" CLASSID="clsid:3050f819-98b5-11cf-bb82-00aa00bdce0b" width="0px" height="0px"></OBJECT>
<INPUT TYPE="button" value="系统字体取得" onclick="getSystemFonts()">
</BODY>
</HTML>
<HEAD>
<TITLE></TITLE>
<SCRIPT type="text/javascript">
function getSystemFonts(){
var cnt = dlgHelper.fonts.count
var str = "系统字体总数:" + cnt + "nn"
var list = new Array()
for (var i = 1; i < cnt; i++){
list.push(dlgHelper.fonts(i))
}
alert(str + list.sort().join("t"))
}
</SCRIPT>
</HEAD>
<BODY>
<OBJECT id="dlgHelper" CLASSID="clsid:3050f819-98b5-11cf-bb82-00aa00bdce0b" width="0px" height="0px"></OBJECT>
<INPUT TYPE="button" value="系统字体取得" onclick="getSystemFonts()">
</BODY>
</HTML>
- 上一篇: JAVASCRIPT通用库
- 下一篇: 在网页中屏蔽快捷键
-= 资 源 教 程 =-
文 章 搜 索