如何将视觉变量作为参数传递给 java 脚本
How to pass sightly variable as an argument to java script
这是我的代码:
<div id="highcharts-sjlyUWsr">
<script src="https://app.everviz.com/inject/sjlyUWsr/" defer="defer" onerror="failed(${sightlyVariable})"></script>
</div>
注意:我在 javascript 函数中传递了 sightly 变量,该函数抛出一条错误消息并且无法正常工作。
你试过了吗?
<script src="https://app.everviz.com/inject/sjlyUWsr/"
data-sly-test.err="failed('${sightlyVariable}')" defer="defer" onerror="${err@ context='attribute'}"
></script>
这是我的代码:
<div id="highcharts-sjlyUWsr">
<script src="https://app.everviz.com/inject/sjlyUWsr/" defer="defer" onerror="failed(${sightlyVariable})"></script>
</div>
注意:我在 javascript 函数中传递了 sightly 变量,该函数抛出一条错误消息并且无法正常工作。
你试过了吗?
<script src="https://app.everviz.com/inject/sjlyUWsr/"
data-sly-test.err="failed('${sightlyVariable}')" defer="defer" onerror="${err@ context='attribute'}"
></script>