Html tag beginning with question mark?(以问号开头的HTML标签?)
问题描述
我正在学习谷歌应用脚本,并且在 this 教程,我看到了一些看起来很奇怪的语法:<?/* JS 代码 */?>
和 =/* JS 代码 */?>
I'm learning google apps script, and in this tutorial, I saw some weird looking syntax: <? /* JS code */ ?>
and <?= /* JS code */ ?>
<!DOCTYPE html>
<html>
<head>
<base target="_top">
<title>Message Display Test</title>
<link rel="stylesheet" href="https://ssl.gstatic.com/docs/script/css/add-ons1.css">
</head>
<body style="padding:3em;">
<h1>Messages</h1>
<ul>
<? for(var m=0;m<messages.length;m++){ ?>
<li><?= messages[m].getSubject() ?></li>
<p><?= messages[m].getPlainBody() ?></p>
<? } ?>
</ul>
</body>
</html>
我可以理解发生了什么,但我仍然感到困惑.我在学习 HTML 时从未见过这些.这与脚本标签相比如何?
I can kind of understand what is going on, but I'm still confused. I've never seen these while learning HTML. How does this compare to script tags?
推荐答案
在 Google Apps 脚本中 ...?>
被称为标准小脚本 <?= ...?>
是打印的 scriptlet 和 <?!= ...?>
是强制打印脚本.它们用于 Google Apps Script HTML Service 模板化 HTML.
In Google Apps Script <? . . .?>
are called standar scriptlets, <?= . . . ?>
are printed scriptlets and <?!= . . . ?>
are force printing scriplets. They are used in Google Apps Script HTML Service templated HTML.
资源
- https://developers.google.com/apps-script/guides/html/模板
相关
- 如何在 Google Apps Script 中的 HTMLOutput 中使用 scriptlet
- <?!= 在 Google Apps 脚本中是什么意思?
这篇关于以问号开头的HTML标签?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!
本文标题为:以问号开头的HTML标签?


- 如何使用 JSON 格式的 jQuery AJAX 从 .cfm 页面输出查 2022-01-01
- 400或500级别的HTTP响应 2022-01-01
- Quasar 2+Apollo:错误:找不到ID为默认的Apollo客户端。如果您在组件设置之外,请使用ProvideApolloClient() 2022-01-01
- Fetch API 如何获取响应体? 2022-01-01
- Css:将嵌套元素定位在父元素边界之外一点 2022-09-07
- CSS媒体查询(最大高度)不起作用,但为什么? 2022-01-01
- 使用RSelum从网站(报纸档案)中抓取多个网页 2022-09-06
- addEventListener 在 IE 11 中不起作用 2022-01-01
- 失败的 Canvas 360 jquery 插件 2022-01-01
- Flexslider 箭头未正确显示 2022-01-01