0
我想在我的web應用程序中使用谷歌字體。我的呼叫加載谷歌的字體是:如何在IE,Firefox和Chrome中使用谷歌網頁字體
$.get("https://www.googleapis.com/webfonts/v1/webfonts?key=xxxxxxx", function (result) {
var data = {};
console.log(result);
console.log($.parseJSON(result));
data.items = $.parseJSON(result).items;
});
上述呼叫給出以下結果在我3個靶瀏覽器:
火狐
console.log(result); ========> JSON string
console.log($.parseJSON(result)); ========> Successfully parsed the json string
data.items = $.parseJSON(result).items; ===> contains all google fonts
IE(9)
$.get callback is not executing.
鉻
console.log(result); ========> Object
console.log($.parseJSON(result)); ========> null
可有人告訴我使用谷歌的字體在所有上述3所述瀏覽器的通用方法是什麼?