我使用http://fixer.io/货币转换器转换货币。
它只工作一次,现在它无效。
我添加 money.js ,其余的脚本提到了一个例子
只有在我使用 GBP到USD 转化
时才有效 var rate = fx(100).from("AED").to("USD");
答案 0 :(得分:2)
这是因为从AJAX调用返回的数据没有AED率
{
"AUD": 1.4373,
"BGN": 1.9558,
"BRL": 3.3784,
"CAD": 1.3894,
"CHF": 1.0707,
"CNY": 7.2382,
"CZK": 27.021,
"DKK": 7.4343,
"GBP": 0.84945,
"HKD": 8.0948,
"HRK": 7.5738,
"HUF": 308.35,
"IDR": 13969,
"ILS": 4.0252,
"INR": 71.039,
"JPY": 122.64,
"KRW": 1251.9,
"MXN": 22.071,
"MYR": 4.694,
"NOK": 8.9905,
"NZD": 1.5024,
"PHP": 51.811,
"PLN": 4.3778,
"RON": 4.5086,
"RUB": 63.408,
"SEK": 9.5238,
"SGD": 1.5047,
"THB": 37.375,
"TRY": 3.7387,
"USD": 1.0437,
"ZAR": 14.241
}