可以通过设css为字体排个序,让客户端显示优先级高的字体(在它有的情况下)
要取得客户端的字体不大可能吧
关注

解决方案 »

  1.   

    可以获得客户端的所有字体列表,msdn里有这篇文章的。
      

  2.   

    IE 6.0<HTML>
    <HEAD>
    <TITLE></TITLE>
    <SCRIPT type="text/javascript">
    function getSystemFonts(){ 
    var cnt = dlgHelper.fonts.count
    var str = "系统字体总数:" + cnt + "\n\n"
    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>
      

  3.   

    to  bencalie(Bencalie):
    在更低版本的IE中就没有办法取了吗?
      

  4.   

    Dialog Helper Object--------------------------------------------------------------------------------Provides access the color dialog box, as well as the block format and fonts collections. Members TableThe following table lists the members exposed by the Dialog Helper object. Click a tab on the left to choose the type of member you want to view.  Collections     
     
    Show: 
    Collections 
    Methods 
     Collection Description 
    blockFormats Retrieves a collection of strings that specify the names of the available block format tags. 
    fonts Retrieves a collection of all the system-supported fonts. 
     
     
     CollectionsMethodsMethod Description 
    ChooseColorDlg Opens the system color-selection dialog box. 
    getCharset Retrieves a Variant that specifies the character set of the specified font. ResTo create this object, use the OBJECT element and provide the class identifier (CLSID) for the dialog helper. ExampleThis code creates a dialog helper object which can be referenced by its id value.<OBJECT id=dlgHelper CLASSID="clsid:3050f819-98b5-11cf-bb82-00aa00bdce0b" width="0px" height="0px">
    </OBJECT>