[英]HTML: what is this variable in curly braces? I never saw it before
Can somebody tell what variable is this {traveler.iFare} ? 有人能说出这个{traveler.iFare}的变量吗? As far as i know this is not PHP one, and in project where i found it there is no template engines used.
据我所知,这不是PHP,在项目中我发现它没有使用模板引擎。
<td class="t-r">
<span class="no-br p-l5">
<strong>
{traveler.iFare}
{traveler.sCurrency}
</strong>
</span>
</td>
I want to call JavaScript function with 'iFare' as a parameter, but cant understand how 我想用'iFare'作为参数来调用JavaScript函数,但是无法理解如何
<script>
document.write(window.functions.function(param));
</script>
In order to the the value of the iFare. 为了iFare的价值。 The simple script can do it very well
简单的脚本可以做得很好
var iFare = traveler.iFare
and use it as you wish. 并按您的意愿使用它。 This can be done because the
{traveler.iFare}
comes from a templating engine and after analysing this I can tell that the traveler.iFare
is a simple JSON object which has a value iFare
associated. 这是可以做到,因为
{traveler.iFare}
来自一个模板引擎和分析这些后,我可以告诉大家, traveler.iFare
是具有价值的简单JSON对象iFare
关联。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.