Answer the question
In order to leave comments, you need to log in
Answer the question
In order to leave comments, you need to log in
<script type="text/javascript">
var GROUP = '<?php echo $group;?>';
document.write('Твоя переменная теперь в js ' + GROUP);
alert("Твоя переменная теперь в js " + GROUP + "!");
</script>
/*Код в template.php*/
BX.ready(function () {
var ourJsObj = new ourJs(<?= json_encode($ourParams) ?>);
});
/*Код в script.js*/
ourJs = function (params) {
this.params = params;
console.log(this.params);
};
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question