デモ
コード.gs
function doGet() {
return HtmlService.createHtmlOutputFromFile("index");
}
|
意訳この機能がやること 指定したHTMLファイルを表示する |
index.html
<!DOCTYPE html>
<html>
<body>
<textarea id="ta">テキスト</textarea>
<script>
document.getElementById('ta').onkeyup = taKeyup;
function taKeyup() {
console.log("changed!");
if(document.getElementById('ta').value === "") {
alert("blank");
}
}
</script>
</body>
</html>
|