LANG SELRCT

Apps Script Reference  (Create: Create new Spreadsheet | Create new Apps Script

Saturday, January 20, 2018

画像を表示する

HTML Serviceでこういう画像を表示する







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




index.html
<!DOCTYPE html>
<html>
  <body>
    <a href="http://3.bp.blogspot.com/-e5Z1Y01JXlc/WmEezR-iguI/AAAAAAAACOs/FNpAyocnKhw48cRyzzN1axtbuhEpyORIQCK4BGAYYCw/s1600/icon-1.png">
      <img src="https://3.bp.blogspot.com/-e5Z1Y01JXlc/WmEezR-iguI/AAAAAAAACOs/FNpAyocnKhw48cRyzzN1axtbuhEpyORIQCK4BGAYYCw/s1600/icon-1.png" />
    </a>
  </body>
</html>
意訳
これはHTML5文書です


クリックした時に元の画像を表示するようにリンク先を設定する
img要素で画像のリンク先を設定して表示する






Latest post

Extracting data from Google Sheets with regular expressions

Introduction Regular expressions are a powerful tool that can be used to extract data from text.  In Google Sheets, regular expressions ca...