出于某种原因,我无法获得 JSON 的值,任何人都可以帮助我吗?
function forex() {
var to = document.getElementById("to").value;
alert(to);
var from = document.getElementById("from").value;
alert(from);
var amount = document.getElementById("amount").value;
alert(amount);
$.getJSON("http://rate-exchange.appspot.com/currency?from=" + from + "&to=" + to + "&q=" + amount, function (response) {
alert(response);
});
}