HTML标记以问号开头? [英] Html tag beginning with question mark?
本文介绍了HTML标记以问号开头?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
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脚本HTML服务模板化的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.
资源
相关
这篇关于HTML标记以问号开头?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文