访问 coinbase API https://coinbase.com/api/doc/1.0/currencies/exchange_rates.html 就我而言,我有带有比特币字段和其他货币字段(美元、英镑、欧元等)的文本框。是
<h6>BTC</h6>
<input type="text" id ="coin"/>
<div class="row">
<h6>USD</h6>
<input type="text" id='usd'/>
</div>
<div class="row">
<h6>GBP</h6>
<input type="text" id="gbp"/>
</div>
javascript
$(document).ready(function () {
$('#coin').keyup(function () {
var url = 'https://coinbase.com/api/v1/currencies/exchange_rates?callback=?';
$.getJSON(url, function (data) {
});
});
});
错误
语法错误:缺少;声明之前
{"vnd_to_usd":"4.7e-05","ars_to_btc":"0.00021","mmk_to_btc":"2.0e-06","ye..
我在这里做错了什么?