<!DOCTYPE html>
<html>
<head>
<base target="_top">
</head>
<body onload="sample()">
<p id="memo"></p>
<?!= HtmlService.createHtmlOutputFromFile('sample').getContent(); ?>
</body>
</html>
function doGet(e) {
var template = HtmlService.createTemplateFromFile('index');
return template.evaluate()
.setTitle('ノート')
.setSandboxMode(HtmlService.SandboxMode.IFRAME);
}
function f() {
var id="1Vr6knUj7VnQ4eTW_RiTkLgI6FwKGiFPZ965zE-oum6U";
ex1 = SpreadsheetApp.openById(id);
sheet = ex1.getSheetByName("data");
sheet.getRange(1,1).setValue("abc");
sheet.getRange(3,1).setValue("abc6");
}
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js"></script>
<script>
function sample(){
google.script.run
.withSuccessHandler(function() {
$("#memo").html("abc");})
.withFailureHandler(function(msg) {})
.f();
}
</script>
最終更新:2016年03月19日 17:36