【发布时间】:2015-07-24 11:23:02
【问题描述】:
我在 yql 中执行此查询,它在 yahoo 控制台中运行良好,但我认为错误在脚本中,这是我写的。我只需要得到日期,我没有得到他。什么是错的。这是脚本。
var yql = 'select * from html where url="http://finance.yahoo.com/q?s=mo&ql=1" AND xpath="//*[@id=\'table1\']//tr[7]//td/text()"';
var queryURL = 'https://query.yahooapis.com/v1/public/yql?q=' + yql + '&format=json&env=http%3A%2F%2Fdatatables.org%2Falltables.env&callback=?';
$.getJSON(queryURL, function (data) {
var ss;
$.each(data.query.results, function (index, item) {
ss += item.results;
});
$("#test").html(ss);
});
【问题讨论】: