js获取系统字体
var defaultFont = getComputedSylte in window?getComputedStyle(document.documentElement)[font-family]:document.documentElement.currentStyle[font-family]; //defaultFont的结果就是浏览器的默认字体名称。至于你说系统的默认字体名称。我认为是无法取到的。function getFontFamily(elem) {
var computedStyles = getComputedStyle in window? window.getComputedStyle(elem):elem.currentStyle;
console.log(computedStyles[font-family]);
}
getFontFamily($("body")[0]);