Created
July 21, 2021 14:29
-
-
Save WakkyFree/b98043e70608ff1649d94362d35bd634 to your computer and use it in GitHub Desktop.
html to write spreadsheets by google apps script
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html> | |
<head> | |
<base target="_top"> | |
<script type="text/javascript"> | |
function sendText(){ | |
google.script.run | |
.withSuccessHandler(inform()) | |
.writeSheet(document.forms['formText'].elements['message'].value); | |
} | |
function inform() { | |
alert('スプレッドシートに書き込みました'); | |
} | |
</script> | |
</head> | |
<body> | |
<h1>スプレッドシート書き込みテスト</h1> | |
<p>スプレッドシートに書き込む内容を入力↓</p> | |
<form name="formText"> | |
<input type="text" name="message"> | |
<input type="button" onclick="sendText()" value="送信"> | |
</form> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment