我从使用 google.visualization 创建表格的 google 脚本中收到错误“未定义 google”。
你如何添加对谷歌脚本的引用,如果我让它在脚本中运行,我还必须将它添加到我的谷歌网站吗?我会把我的脚本放在下面。
<script type="text/javascript" src="https://www.google.com/jsapi"></script>
function doGet() {
drawTable()
}
function drawTable() {
var data = new google.visualization.DataTable();
data.addColumn('string', 'Name');
data.addColumn('number', 'Salary');
data.addColumn('boolean', 'Full Time');
data.addRows(1);
data.setCell(0, 0, 'John');
data.setCell(0, 1, 10000, '$10,000');
data.setCell(0, 2, true);
var table = new google.visualization.Table(document.getElementById('table_div'));
table.draw(data, {showRowNumber: true});
google.visualization.events.addListener(table, 'select', function() {
var row = table.getSelection()[0].row;
alert('You selected ' + data.getValue(row, 0));
});
}
Run Code Online (Sandbox Code Playgroud) 我有一个VB6项目,我没有创建,但我必须更新,当我去做exe我得到一个编译错误:找不到方法或数据成员,它在下面的代码中也指向"SCom1.FileReceive" .当我查看Main表单时,SCom1控件是PictureBox.
这段代码已经工作了5年,但我不知道为什么SCom1是一个图片框,或者为什么我收到错误,它是一个参考?我的SCom1看起来像MSComm功能?让我知道如果有人有任何想法,我只是不知道VB足以知道如何解决这个问题.谢谢
If SCom1.FileReceive = True Then
WriteToLog (Now() & " FileReceive was true, now false")
SCom1.FileReceive = False
End If
Run Code Online (Sandbox Code Playgroud)