1

I have an html file where I need to render the app id that will come from a script sharp (.js.cs) file. Do you know how I can set this up?

<script type="text/javascript" data-app-id="value" src="https://xyz.js"></script>

Thank you,

Edit: Including more details if needed. I have an html file which has script like above, it renders scripts from a source location. But there when the solution is deployed, each Organization will have it's data-app-id which will be coming from back end. I have this value in a .js.cs file, but how to set it in the above script at run time?

4

1 回答 1

1

将 js 文件添加到您的项目并在其中定义一个变量

 var myValue="";

设置data-app-id= myValue

<script type="text/javascript" data-app-id=myValue src="https://xyz.js"></script>

然后你可以在你想要的任何地方更新这个变量

于 2012-11-19T08:51:23.667 回答