Apps Scriptリファレンス: Apps Script Reference |障害・課題追跡: IssueTracker |Google Workspace: Status Dashboard - Summary

2019年3月13日水曜日

開いているページのURLを取得したい(location.href)


location.hrefで取得できる。



コード.gs
function doGet() {
  return HtmlService.createHtmlOutputFromFile("index");
}
意訳
この機能がやること
指定したHTMLファイルを表示する




index.html
<!DOCTYPE html>
<html>
<body>
<script>
  alert(location.href);
</script>
</body>
</html>

意訳
 



現在のURLをアラートに出す






Latest post

Google Formsでセクションの中にタイトルと説明を追加したい(addSectionHeaderItem)

今回はセクションの中に「タイトルと説明を追加」してみます フォームの編集画面 題名と説明を書くブロックが追加されます 今回の例では以下のように入力します 題名: SectionHeader 説明: Please answer the following questions. フォ...