【LIFF v2】テンプレートメッセージのサンプル【LINE】

今回はテンプレートメッセージを紹介します。

文字だけのメッセージとは違い、完全にコンテンツと呼べるレベルのメッセージが送信できるので

使いこなせばLINEマスターと名乗れるかもしれません。

 

テンプレートボタンを使う

 

  1. <!DOCTYPE html>
  2. <html lang="jp" dir="ltr">
  3. <head>
  4. <meta charset="utf-8">
  5. <meta name="viewport" content="width=device-width, initial-scale=1.0">
  6. <title>XP LIFF</title>
  7. <script src="https://static.line-scdn.net/liff/edge/2.1/sdk.js"></script>
  8. <script type="text/javascript">
  9. document.addEventListener("DOMContentLoaded", () => {
  10. liff
  11. .init({
  12. liffId: '<LIFF_ID>'
  13. })
  14. .then(() => {
  15. document.getElementById('go').addEventListener('click', () => {
  16. if (!liff.isInClient()) {
  17. document.getElementById('log').value += 'ng\n';
  18. } else {
  19. liff.sendMessages([{
  20. 'type': 'template',
  21. 'altText': document.getElementById('AltText').value,
  22. 'template': {
  23. 'type': 'buttons',
  24. 'thumbnailImageUrl': document.getElementById('ThumbnailImageUrl').value,
  25. 'imageAspectRatio': document.getElementById('ImageAspectRatio').value,
  26. 'imageSize': document.getElementById('ImageSize').value,
  27. 'imageBackgroundColor': document.getElementById('ImageBackgroundColor').value,
  28. 'title': document.getElementById('Title').value,
  29. 'text': document.getElementById('Text').value,
  30. 'defaultAction': {
  31. 'type': 'uri',
  32. 'label': document.getElementById('Label0').value,
  33. 'uri': document.getElementById('Uri0').value
  34. },
  35. 'actions': [{
  36. 'type': 'uri',
  37. 'label': document.getElementById('Label1').value,
  38. 'uri': document.getElementById('Uri1').value
  39. },{
  40. 'type': 'uri',
  41. 'label': document.getElementById('Label2').value,
  42. 'uri': document.getElementById('Uri2').value
  43. },{
  44. 'type': 'uri',
  45. 'label': document.getElementById('Label3').value,
  46. 'uri': document.getElementById('Uri3').value
  47. },{
  48. 'type': 'uri',
  49. 'label': document.getElementById('Label4').value,
  50. 'uri': document.getElementById('Uri4').value
  51. }]
  52. }
  53. }]).then(function() {
  54. document.getElementById('log').value += 'completed\n';
  55. }).catch(function(error) {
  56. document.getElementById('log').value += error + '\n';
  57. });
  58. }
  59. });
  60. })
  61. .catch((err) => {
  62. document.getElementById('log').value = 'init ng\n' + err;
  63. });
  64. });
  65. </script>
  66. </head>
  67. <body>
  68. <div>
  69. <h3>テンプレートボタン</h3>
  70. <div>altText<input type="text" id="AltText" value="CrossPower"/></div>
  71. <div>thumbnailImageUrl<input type="text" id="ThumbnailImageUrl" value="https://www.x-power.co.jp/images/header/logo.png"/></div>
  72. <div>imageAspectRatio
  73. <select id="ImageAspectRatio">
  74. <option value="rectangle" selected>rectangle:1.51:1</option>
  75. <option value="square">square:1:1</option>
  76. </select>
  77. </div>
  78. <div>imageSize
  79. <select id="ImageSize">
  80. <option value="cover">cover</option>
  81. <option value="contain" selected>contain</option>
  82. </select>
  83. </div>
  84. <div>imageBackgroundColor<input type="text" id="ImageBackgroundColor" value="#333333"/></div>
  85. <div>title<input type="text" id="Title" value="クロスパワー"/></div>
  86. <div>text<input type="text" id="Text" value="Solution to your future"/></div>
  87. <div>デフォルトラベル<input type="text" id="Label0" value="TOP"/></div>
  88. <div>デフォルトURI<input type="text" id="Uri0" value="https://www.x-power.co.jp/"/></div>
  89. <div>label1<input type="text" id="Label1" value="事業内容"/></div>
  90. <div>uri1<input type="text" id="Uri1" value="https://www.x-power.co.jp/service.html"/></div>
  91. <div>label2<input type="text" id="Label2" value="導入事例"/></div>
  92. <div>uri2<input type="text" id="Uri2" value="https://www.x-power.co.jp/case.html"/></div>
  93. <div>label3<input type="text" id="Label3" value="会社概要"/></div>
  94. <div>uri3<input type="text" id="Uri3" value="https://www.x-power.co.jp/about.html#company"/></div>
  95. <div>label4<input type="text" id="Label4" value="沿革"/></div>
  96. <div>uri4<input type="text" id="Uri4" value="https://www.x-power.co.jp/about.html#history"/></div>
  97. <input type="button" id="go" value="実行"/>
  98. <textarea id="log" style="width:96%;height:100px;"></textarea>
  99. </div>
  100. </body>
  101. </html>

イメージ

LINE上にボタンを配置することができ、

ボタンを押した時にWebサイトへジャンプすることができます。

確認ボタンを使う

  1. <!DOCTYPE html>
  2. <html lang="jp" dir="ltr">
  3. <head>
  4. <meta charset="utf-8">
  5. <meta name="viewport" content="width=device-width, initial-scale=1.0">
  6. <title>XP LIFF</title>
  7. <script src="https://static.line-scdn.net/liff/edge/2.1/sdk.js"></script>
  8. <script type="text/javascript">
  9. document.addEventListener("DOMContentLoaded", () => {
  10. liff
  11. .init({
  12. liffId: '<LIFF_ID>'
  13. })
  14. .then(() => {
  15. document.getElementById('go').addEventListener('click', () => {
  16. if (!liff.isInClient()) {
  17. document.getElementById('log').value += 'ng\n';
  18. } else {
  19. liff.sendMessages([{
  20. 'type': 'template',
  21. 'altText': document.getElementById('AltText').value,
  22. 'template': {
  23. 'type': 'confirm',
  24. 'text': document.getElementById('Text').value,
  25. 'actions': [{
  26. 'type': 'uri',
  27. 'label': document.getElementById('Label1').value,
  28. 'uri': document.getElementById('Uri1').value
  29. },{
  30. 'type': 'uri',
  31. 'label': document.getElementById('Label2').value,
  32. 'uri': document.getElementById('Uri2').value
  33. }]
  34. }
  35. }]).then(function() {
  36. document.getElementById('log').value += 'completed\n';
  37. }).catch(function(error) {
  38. document.getElementById('log').value += error + '\n';
  39. });
  40. }
  41. });
  42. })
  43. .catch((err) => {
  44. document.getElementById('log').value = 'init ng\n' + err;
  45. });
  46. });
  47. </script>
  48. </head>
  49. <body>
  50. <div>
  51. <h3>確認</h3>
  52. <div>altText<input type="text" id="AltText" value="確認"/></div>
  53. <div>text<input type="text" id="Text" value="Googleを開きますか?"/></div>
  54. <div>label1<input type="text" id="Label1" value="はい"/></div>
  55. <div>uri1<input type="text" id="Uri1" value="https://www.google.co.jp"/></div>
  56. <div>label2<input type="text" id="Label2" value="いいえ"/></div>
  57. <div>uri2<input type="text" id="Uri2" value="https://www.x-power.co.jp/"/></div>
  58. <input type="button" id="go" value="実行"/>
  59. <textarea id="log" style="width:96%;height:100px;"></textarea>
  60. </div>
  61. </body>
  62. </html>

イメージ

2つしかボタンの無いシンプルな確認フォームが作れます。

画像が使えないので注意が必要です。

 

ルーセルを使う

  1. <!DOCTYPE html>
  2. <html lang="jp" dir="ltr">
  3. <head>
  4. <meta charset="utf-8">
  5. <meta name="viewport" content="width=device-width, initial-scale=1.0">
  6. <title>XP LIFF</title>
  7. <script src="https://static.line-scdn.net/liff/edge/2.1/sdk.js"></script>
  8. <script type="text/javascript">
  9. document.addEventListener("DOMContentLoaded", () => {
  10. liff
  11. .init({
  12. liffId: '<LIFF_ID>'
  13. })
  14. .then(() => {
  15. document.getElementById('go').addEventListener('click', () => {
  16. if (!liff.isInClient()) {
  17. document.getElementById('log').value += 'ng\n';
  18. } else {
  19. liff.sendMessages([{
  20. 'type': 'template',
  21. 'altText': document.getElementById('AltText').value,
  22. 'template': {
  23. 'type': 'carousel',
  24. 'columns': [{
  25. 'thumbnailImageUrl': document.getElementById('ThumbnailImageUrlA').value,
  26. 'imageBackgroundColor': document.getElementById('ImageBackgroundColorA').value,
  27. 'title': document.getElementById('TitleA').value,
  28. 'text': document.getElementById('TextA').value,
  29. 'defaultAction': {
  30. 'type': 'uri',
  31. 'label': document.getElementById('LabelA').value,
  32. 'uri': document.getElementById('UriA').value
  33. },
  34. 'actions': [{
  35. 'type': 'uri',
  36. 'label': document.getElementById('LabelA1').value,
  37. 'uri': document.getElementById('UriA1').value
  38. },{
  39. 'type': 'uri',
  40. 'label': document.getElementById('LabelA2').value,
  41. 'uri': document.getElementById('UriA2').value
  42. },{
  43. 'type': 'uri',
  44. 'label': document.getElementById('LabelA3').value,
  45. 'uri': document.getElementById('UriA3').value
  46. }]
  47. }, {
  48. 'thumbnailImageUrl': document.getElementById('ThumbnailImageUrlB').value,
  49. 'imageBackgroundColor': document.getElementById('ImageBackgroundColorB').value,
  50. 'title': document.getElementById('TitleB').value,
  51. 'text': document.getElementById('TextB').value,
  52. 'defaultAction': {
  53. 'type': 'uri',
  54. 'label': document.getElementById('LabelB').value,
  55. 'uri': document.getElementById('UriB').value
  56. },
  57. 'actions': [{
  58. 'type': 'uri',
  59. 'label': document.getElementById('LabelB1').value,
  60. 'uri': document.getElementById('UriB1').value
  61. },{
  62. 'type': 'uri',
  63. 'label': document.getElementById('LabelB2').value,
  64. 'uri': document.getElementById('UriB2').value
  65. },{
  66. 'type': 'uri',
  67. 'label': document.getElementById('LabelB3').value,
  68. 'uri': document.getElementById('UriB3').value
  69. }]
  70. }, {
  71. 'thumbnailImageUrl': document.getElementById('ThumbnailImageUrlC').value,
  72. 'imageBackgroundColor': document.getElementById('ImageBackgroundColorC').value,
  73. 'title': document.getElementById('TitleC').value,
  74. 'text': document.getElementById('TextC').value,
  75. 'defaultAction': {
  76. 'type': 'uri',
  77. 'label': document.getElementById('LabelC').value,
  78. 'uri': document.getElementById('UriC').value
  79. },
  80. 'actions': [{
  81. 'type': 'uri',
  82. 'label': document.getElementById('LabelC1').value,
  83. 'uri': document.getElementById('UriC1').value
  84. },{
  85. 'type': 'uri',
  86. 'label': document.getElementById('LabelC2').value,
  87. 'uri': document.getElementById('UriC2').value
  88. },{
  89. 'type': 'uri',
  90. 'label': document.getElementById('LabelC3').value,
  91. 'uri': document.getElementById('UriC3').value
  92. }]
  93. }],
  94. 'imageAspectRatio': document.getElementById('ImageAspectRatio').value,
  95. 'imageSize': document.getElementById('ImageSize').value
  96. }
  97. }]).then(function() {
  98. document.getElementById('log').value += 'completed\n';
  99. }).catch(function(error) {
  100. document.getElementById('log').value += error + '\n';
  101. });
  102. }
  103. });
  104. })
  105. .catch((err) => {
  106. document.getElementById('log').value = 'init ng\n' + err;
  107. });
  108. });
  109. </script>
  110. </head>
  111. <body>
  112. <div>
  113. <h3>カルーセル</h3>
  114. <div>altText<input type="text" id="AltText" value="カルーセル"/></div>
  115. <h4>1列目</h4>
  116. <div>thumbnailImageUrlA<input type="text" id="ThumbnailImageUrlA" value="https://3.bp.blogspot.com/-p41t8kD9ChE/UacVdY0mD4I/AAAAAAAAUZ8/q271mQQTWPo/s320/banner_season.jpg"/></div>
  117. <div>imageBackgroundColorA<input type="text" id="ImageBackgroundColorA" value="#880000"/></div>
  118. <div>titleA<input type="text" id="TitleA" value="祝日・行事"/></div>
  119. <div>textA<input type="text" id="TextA" value="季節ごとのイラスト"/></div>
  120. <div>labelA<input type="text" id="LabelA" value="ラベルA"/></div>
  121. <div>UriA<input type="text" id="UriA" value="https://www.irasutoya.com/p/seasons.html"/></div>
  122. <div>labelA1<input type="text" id="LabelA1" value="コタツでくつろぐぴょこ"/></div>
  123. <div>uriA1<input type="text" id="UriA1" value="https://www.irasutoya.com/2020/01/blog-post.html"/></div>
  124. <div>labelA2<input type="text" id="LabelA2" value="福男選び"/></div>
  125. <div>uriA2<input type="text" id="UriA2" value="https://www.irasutoya.com/2019/06/blog-post_260.html"/></div>
  126. <div>labelA3<input type="text" id="LabelA3" value="綺麗に色が出るプリンター"/></div>
  127. <div>uriA3<input type="text" id="UriA3" value="https://www.irasutoya.com/2019/12/blog-post_700.html"/></div>
  128. <h4>2列目</h4>
  129. <div>thumbnailImageUrlB<input type="text" id="ThumbnailImageUrlB" value="https://3.bp.blogspot.com/-Ysg9gD0BSWg/UNrdB2zjPMI/AAAAAAAAJkA/3v15_io6FmQ/s320/banner_food_cooking.jpg"/></div>
  130. <div>imageBackgroundColorB<input type="text" id="ImageBackgroundColorB" value="#008800"/></div>
  131. <div>titleB<input type="text" id="TitleB" value="食べ物・料理"/></div>
  132. <div>textB<input type="text" id="TextB" value="食べ物のイラスト"/></div>
  133. <div>labelB<input type="text" id="LabelB" value="ラベルB"/></div>
  134. <div>UriB<input type="text" id="UriB" value="https://www.irasutoya.com/p/food.html"/></div>
  135. <div>labelB1<input type="text" id="LabelB1" value="円盤餃子"/></div>
  136. <div>uriB1<input type="text" id="UriB1" value="https://www.irasutoya.com/2019/11/blog-post_936.html"/></div>
  137. <div>labelB2<input type="text" id="LabelB2" value="ラクサラーメン"/></div>
  138. <div>uriB2<input type="text" id="UriB2" value="https://www.irasutoya.com/2019/11/blog-post_53.html"/></div>
  139. <div>labelB3<input type="text" id="LabelB3" value="カレーライス"/></div>
  140. <div>uriB3<input type="text" id="UriB3" value="https://www.irasutoya.com/2019/10/blog-post_725.html"/></div>
  141. <h4>3列目</h4>
  142. <div>thumbnailImageUrlC<input type="text" id="ThumbnailImageUrlC" value="https://2.bp.blogspot.com/-Q1rLID5m0aA/UOzk8GDG5JI/AAAAAAAAKcs/q9eNBXbELeg/s1600/banner_seikatsu.jpg"/></div>
  143. <div>imageBackgroundColorC<input type="text" id="ImageBackgroundColorC" value="#000088"/></div>
  144. <div>titleC<input type="text" id="TitleC" value="生活"/></div>
  145. <div>textC<input type="text" id="TextC" value="家事のイラスト"/></div>
  146. <div>labelC<input type="text" id="LabelC" value="ラベルC"/></div>
  147. <div>UriC<input type="text" id="UriC" value="https://www.irasutoya.com/p/life.html"/></div>
  148. <div>labelC1<input type="text" id="LabelC1" value="皿洗い"/></div>
  149. <div>uriC1<input type="text" id="UriC1" value="https://www.irasutoya.com/2019/12/blog-post_783.html"/></div>
  150. <div>labelC2<input type="text" id="LabelC2" value="粘着ローラーがけ"/></div>
  151. <div>uriC2<input type="text" id="UriC2" value="https://www.irasutoya.com/2019/12/blog-post_25.html"/></div>
  152. <div>labelC3<input type="text" id="LabelC3" value="雑巾を絞る人"/></div>
  153. <div>uriC3<input type="text" id="UriC3" value="https://www.irasutoya.com/2019/09/blog-post_641.html"/></div>
  154. <h4>全般</h4>
  155. <div>imageAspectRatio
  156. <select id="ImageAspectRatio">
  157. <option value="rectangle" selected>rectangle:1.51:1</option>
  158. <option value="square">square:1:1</option>
  159. </select>
  160. </div>
  161. <div>imageSize
  162. <select id="ImageSize">
  163. <option value="cover">cover</option>
  164. <option value="contain" selected>contain</option>
  165. </select>
  166. </div>
  167. <input type="button" id="go" value="実行"/>
  168. <textarea id="log" style="width:96%;height:100px;"></textarea>
  169. </div>
  170. </body>
  171. </html>

 

イメージ

テンプレートボタンを横に並べたような物が作れます。

ボタンや画像の数が多いので、かなりの量のリンクを設定できます。

 

画像カルーセルを使う

 

  1. <!DOCTYPE html>
  2. <html lang="jp" dir="ltr">
  3. <head>
  4. <meta charset="utf-8">
  5. <meta name="viewport" content="width=device-width, initial-scale=1.0">
  6. <title>XP LIFF</title>
  7. <script src="https://static.line-scdn.net/liff/edge/2.1/sdk.js"></script>
  8. <script type="text/javascript">
  9. document.addEventListener("DOMContentLoaded", () => {
  10. liff
  11. .init({
  12. liffId: '<LIFF_ID>'
  13. })
  14. .then(() => {
  15. document.getElementById('go').addEventListener('click', () => {
  16. if (!liff.isInClient()) {
  17. document.getElementById('log').value += 'ng\n';
  18. } else {
  19. liff.sendMessages([{
  20. 'type': 'template',
  21. 'altText': document.getElementById('AltText').value,
  22. 'template': {
  23. 'type': 'image_carousel',
  24. 'columns': [{
  25. 'imageUrl': document.getElementById('ImageUrl1').value,
  26. 'action': {
  27. 'type': 'uri',
  28. 'label': document.getElementById('Label1').value,
  29. 'uri': document.getElementById('Uri1').value
  30. }
  31. }, {
  32. 'imageUrl': document.getElementById('ImageUrl2').value,
  33. 'action': {
  34. 'type': 'uri',
  35. 'label': document.getElementById('Label2').value,
  36. 'uri': document.getElementById('Uri2').value
  37. }
  38. }, {
  39. 'imageUrl': document.getElementById('ImageUrl3').value,
  40. 'action': {
  41. 'type': 'uri',
  42. 'label': document.getElementById('Label3').value,
  43. 'uri': document.getElementById('Uri3').value
  44. }
  45. }, {
  46. 'imageUrl': document.getElementById('ImageUrl4').value,
  47. 'action': {
  48. 'type': 'uri',
  49. 'label': document.getElementById('Label4').value,
  50. 'uri': document.getElementById('Uri4').value
  51. }
  52. }, {
  53. 'imageUrl': document.getElementById('ImageUrl5').value,
  54. 'action': {
  55. 'type': 'uri',
  56. 'label': document.getElementById('Label5').value,
  57. 'uri': document.getElementById('Uri5').value
  58. }
  59. }, {
  60. 'imageUrl': document.getElementById('ImageUrl6').value,
  61. 'action': {
  62. 'type': 'uri',
  63. 'label': document.getElementById('Label6').value,
  64. 'uri': document.getElementById('Uri6').value
  65. }
  66. }, {
  67. 'imageUrl': document.getElementById('ImageUrl7').value,
  68. 'action': {
  69. 'type': 'uri',
  70. 'label': document.getElementById('Label7').value,
  71. 'uri': document.getElementById('Uri7').value
  72. }
  73. }, {
  74. 'imageUrl': document.getElementById('ImageUrl8').value,
  75. 'action': {
  76. 'type': 'uri',
  77. 'label': document.getElementById('Label8').value,
  78. 'uri': document.getElementById('Uri8').value
  79. }
  80. }, {
  81. 'imageUrl': document.getElementById('ImageUrl9').value,
  82. 'action': {
  83. 'type': 'uri',
  84. 'label': document.getElementById('Label9').value,
  85. 'uri': document.getElementById('Uri9').value
  86. }
  87. }, {
  88. 'imageUrl': document.getElementById('ImageUrl10').value,
  89. 'action': {
  90. 'type': 'uri',
  91. 'label': document.getElementById('Label10').value,
  92. 'uri': document.getElementById('Uri10').value
  93. }
  94. }]
  95. }
  96. }]).then(function() {
  97. document.getElementById('log').value += 'completed\n';
  98. }).catch(function(error) {
  99. document.getElementById('log').value += error + '\n';
  100. });
  101. }
  102. });
  103. })
  104. .catch((err) => {
  105. document.getElementById('log').value = 'init ng\n' + err;
  106. });
  107. });
  108. </script>
  109. </head>
  110. <body>
  111. <div>
  112. <h3>画像カルーセル</h3>
  113. <div>altText<input type="text" id="AltText" value="画像カルーセル"/></div>
  114. <h4>1つ目</h4>
  115. <div>ImageUrl1<input type="text" id="ImageUrl1" value="https://1.bp.blogspot.com/-bvhr8OjNEMU/XkZdVMKXOBI/AAAAAAABXWc/g_U8e9jfcEYF9KmjqggRzt3uwQbdTtbRQCNcBGAsYHQ/s1600/yuudou_people.png"/></div>
  116. <div>label1<input type="text" id="Label1" value="誘導する人のイラスト"/></div>
  117. <div>Uri1<input type="text" id="Uri1" value="https://www.irasutoya.com/2020/03/blog-post_67.html"/></div>
  118. <h4>2つ目</h4>
  119. <div>ImageUrl2<input type="text" id="ImageUrl2" value="https://1.bp.blogspot.com/-g8SvoaWXsu4/WxvKcz2XKGI/AAAAAAABMpQ/bINODvUI3M40fVxhbD8XOHi0fj-R4TI2gCLcBGAs/s800/swimming_life_jacket_boy.png"/></div>
  120. <div>label2<input type="text" id="Label2" value="ライフジャケットを着た男"/></div>
  121. <div>Uri2<input type="text" id="Uri2" value="https://www.irasutoya.com/2018/07/blog-post_90.html"/></div>
  122. <h4>3つ目</h4>
  123. <div>ImageUrl3<input type="text" id="ImageUrl3" value="https://3.bp.blogspot.com/-ul85IZ7jhKI/WaPvZiTEkII/AAAAAAABGMY/H69DFdgjGXU5jhiexESg11fJXKMFcWVhQCLcBGAs/s800/bowling_foul.png"/></div>
  124. <div>label3<input type="text" id="Label3" value="ファウルラインを超える人"/></div>
  125. <div>Uri3<input type="text" id="Uri3" value="https://www.irasutoya.com/2017/09/blog-post_735.html"/></div>
  126. <h4>4つ目</h4>
  127. <div>ImageUrl4<input type="text" id="ImageUrl4" value="https://2.bp.blogspot.com/-GuJM5cIi3K8/VHbNOnnoEzI/AAAAAAAApU8/VAa2CK1C360/s800/hyousyou_sports_man.png"/></div>
  128. <div>label4<input type="text" id="Label4" value="表彰台に乗る選手"/></div>
  129. <div>Uri4<input type="text" id="Uri4" value="https://www.irasutoya.com/2014/11/blog-post_364.html"/></div>
  130. <h4>5つ目</h4>
  131. <div>ImageUrl5<input type="text" id="ImageUrl5" value="https://1.bp.blogspot.com/-de2ZDEAGNh8/VGX8hctsIgI/AAAAAAAApII/s84UVJQkhbs/s800/futago_coodinate.png"/></div>
  132. <div>label5<input type="text" id="Label5" value="女性のペアルック"/></div>
  133. <div>Uri5<input type="text" id="Uri5" value="https://www.irasutoya.com/2014/11/blog-post_863.html"/></div>
  134. <h4>6つ目</h4>
  135. <div>ImageUrl6<input type="text" id="ImageUrl6" value="https://4.bp.blogspot.com/-nunrFXJRg90/Ufj1CjzyVuI/AAAAAAAAWk0/vNpna3tGLfY/s800/baikin_komatta.png"/></div>
  136. <div>label6<input type="text" id="Label6" value="細菌・ばい菌"/></div>
  137. <div>Uri6<input type="text" id="Uri6" value="https://www.irasutoya.com/2013/08/blog-post_5302.html"/></div>
  138. <h4>7つ目</h4>
  139. <div>ImageUrl7<input type="text" id="ImageUrl7" value="https://1.bp.blogspot.com/-MAhXVeGjWx4/UxbLt9zgQeI/AAAAAAAAeDQ/7WLOXCCYOx4/s800/tsumekiri.png"/></div>
  140. <div>label7<input type="text" id="Label7" value="爪切り"/></div>
  141. <div>Uri7<input type="text" id="Uri7" value="https://www.irasutoya.com/2014/03/blog-post_4200.html"/></div>
  142. <h4>8つ目</h4>
  143. <div>ImageUrl8<input type="text" id="ImageUrl8" value="https://1.bp.blogspot.com/-BR1SuUW6Kvg/U8XlRUHfpEI/AAAAAAAAi70/1K7ewvNtssc/s800/music_Ravel.png"/></div>
  144. <div>label8<input type="text" id="Label8" value="ラヴェルの似顔絵"/></div>
  145. <div>Uri8<input type="text" id="Uri8" value="https://www.irasutoya.com/2014/08/blog-post_151.html"/></div>
  146. <h4>9つ目</h4>
  147. <div>ImageUrl9<input type="text" id="ImageUrl9" value="https://4.bp.blogspot.com/-nAGQDv5nIUs/V8VE-Ky1QVI/AAAAAAAA9WQ/ovw-efNG6Yc-dYQ3l2oHiK5n954zriaIwCLcB/s800/flower_chinchouge.png"/></div>
  148. <div>label9<input type="text" id="Label9" value="沈丁花"/></div>
  149. <div>Uri9<input type="text" id="Uri9" value="https://www.irasutoya.com/2016/09/blog-post_34.html"/></div>
  150. <h4>10つ目</h4>
  151. <div>ImageUrl10<input type="text" id="ImageUrl10" value="https://1.bp.blogspot.com/-70jrzLRUA3c/XjEjSPTvbyI/AAAAAAABXKk/57c9UsmuLA4wu7-DIlIL43eRnOADaBKdQCNcBGAsYHQ/s1600/mark_eye_uruuru.png"/></div>
  152. <div>label10<input type="text" id="Label10" value="うるうるした目"/></div>
  153. <div>Uri10<input type="text" id="Uri10" value="https://www.irasutoya.com/2020/02/blog-post_83.html"/></div>
  154. <input type="button" id="go" value="実行"/>
  155. <textarea id="log" style="width:96%;height:100px;"></textarea>
  156. </div>
  157. </body>
  158. </html>

イメージ

画像だけのカルーセルなのでギャラリーに近いです。 10個も画像を貼れるのが、かなり強力!

 

 

 

アプリケーション開発バナー

AWS相談会バナー