我想在 joomla 模块或文章中添加 php、javascript 和 html 代码。 JavaScript 无法正常工作。 我已经这样做了
<?php
include 'file.php';
<?
我应该以某种方式重写代码吗?或者 Joomla 中有一些事情必须完成。 例如,我尝试将 jquery 与 bootstrap 一起使用。
请帮帮我
谢谢
最佳答案
对于 Java 脚本,
$url = "Your script url";
$document = JFactory::getDocument();
$document->addScript($url);
另请参阅https://docs.joomla.org/J3.x:Adding_JavaScript_and_CSS_to_the_page
关于javascript - 如何在 Joomla 模块中添加 javascript,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/42692718/