简体   繁体   English

JavaScript 中的双百分号 (%%) 是什么意思?

[英]What does a double percentage sign (%%) mean in JavaScript?

To give a little context, I am working with BigCommerce theme template files right now, and I do not understand some of the syntax.为了提供一些背景信息,我现在正在使用 BigCommerce 主题模板文件,但我不了解某些语法。

They use a double percentage sign to wrap certain things in the document.他们使用双百分号来包装文档中的某些内容。 An example:一个例子:

<!-- Include visitor tracking code (if any) -->
%%GLOBAL_TrackingCode%%
%%GLOBAL_DesignModeStyleSheet%%
%%GLOBAL_HeaderImageStyle%%

They will also be included in source attributes sometimes, like this:它们有时也会包含在源属性中,如下所示:

<script type="text/javascript" src="%%GLOBAL_TPL_PATH%%/js/imagesLoaded.js"></script>

I can't for the life of me figure out what the %% means.我一生都无法弄清楚 %% 的含义。

Hopefully that will give enough info to answer the question, if anything else is needed let me know.希望这将提供足够的信息来回答这个问题,如果需要其他任何东西,请告诉我。 If this is not a JavaScript thing like I assumed, feel free to move it to the appropriate category.如果这不是我假设的 JavaScript 的东西,请随意将其移至适当的类别。

Thank you in advance!先感谢您!

这不是JavaScript,它显然是模板语言中变量的标记。

它看起来像是一个模板工具,制作模板的人将根据他们想要放入其中的内容而改变。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM