このURLでテーブルの名前を返す関数があります('..../default/call/json/mytables')
getTable()
しかし、URL の値を返すために関数にどのように言うことができるかわかりません。
function getTable(){
return '.../default/call/json/mytables';
}
console.log(getTable());
function initialize() {
var $newDiv = $('<div>').attr('id','chart_div');
$('#reportingContainer').append($newDiv);
// Replace the data source URL on next line with your data source URL.
// Specify that we want to use the XmlHttpRequest object to make the query.
var query = new google.visualization.Query('/datasource?table='+getTable());
// Optional request to return only column C and the sum of column B, grouped by C members.
query.setQuery('select zone_name, sum(cost) group by zone_name');
// Send the query with a callback function.
query.send(drawChart);
}
ありがとう。