如何为其他功能返回ID?
function pickerCallback(data) {
var action = data[google.picker.Response.ACTION];
if (action == google.picker.Action.PICKED) {
var doc = data[google.picker.Response.DOCUMENTS][0];
**var id = doc[google.picker.Document.ID];**
var url = doc[google.picker.Document.URL];
var title = doc[google.picker.Document.NAME];
google.script.run.doSomething(id);
alert(id);
document.getElementById('result').innerHTML =
'<b>You chose:</b><br>Name: <a href="' + url + '">' + title + '</a><br>ID: ' + id;
} else if (action == google.picker.Action.CANCEL) {
document.getElementById('result').innerHTML = 'Picker canceled.';
} }