location.hrefで取得できる。
コード.gs
function doGet() {
return HtmlService.createHtmlOutputFromFile("index");
}
|
意訳この機能がやること 指定したHTMLファイルを表示する |
index.html
<!DOCTYPE html> <html> <body> <script> alert(location.href); </script> </body> </html> |
意訳現在のURLをアラートに出す |